Unix/Linux Go Back    

NetBSD 6.1.5 - man page for ipkdbsbyte (netbsd section 9)

Linux & Unix Commands - Search Man Pages
Man Page or Keyword Search:   man
Select Man Page Set:       apropos Keyword Search (sections above)

IPKDB(9)			  BSD Kernel Developer's Manual 			 IPKDB(9)

     ipkdb -- machine-dependent interface to ipkdb

     #include <ipkdb/ipkdb.h>


     ipkdb_connect(int when);





     ipkdbif_init(struct ipkdb_if *kip);

     ipkdbfbyte(u_char *c);

     ipkdbsbyte(u_char *c, int i);

     The machine-dependent code must support this interface for operation with ipkdb(4).

     During system bootstrap, machine-dependent code must invoke ipkdb_init().	If the kernel is
     booted with RB_KDB set in boothowto (see boothowto(9)), ipkdb(4) is enabled by invoking
     ipkdb_connect(), setting the when argument to 0.

     ipkdbcmds() is invoked by machine-dependent code when the trap mechanism determines that the
     debugger should be entered, i.e., on a single step or breakpoint interrupt from kernel code.
     The trapping mechanism should already have stored the registers into the global area ipkd-
     bregs.  The layout of this area must be the same as that expected by gdb(1).  Valid return
     values are:

	   IPKDB_CMD_RUN     user wants to continue
	   IPKDB_CMD_STEP    user wants to do single stepping
	   IPKDB_CMD_EXIT    user has detached from debugging

     The machine-dependent code must provide the following functions for the machine-independent
     ipkdbinit()	  This routine gets called when the debugger should be entered for the
			  first time.
     ipkdb_trap()	  This routine is part of the trap handler.  Whenever a trap happens
			  (e.g., when hitting a breakpoint during debugging), ipkdb_trap()
			  decides if the Debugger needs to be called.  If there are other ways to
			  decide that, it's not necessary to provide an ipkdb_trap() implementa-
     ipkdb_poll()	  This routine gets called after a panic to check for a key press by the
			  user.  If implemented it allows the user to press any key on the con-
			  sole to do the automatic reboot after a panic.  Otherwise the debugging
			  interface will wait forever for some remote debugger to attach in case
			  of a panic.
     ipkdbif_init(kip)	  In order to be able to find the debugging interface, the network driver
			  must invoke ipkdbif_init() with kip specifying a struct ipkdb_if plus
			  some additional parameters that allow it to access the devices regis-
			  ters, hopefully using bus_space(9) methods.  In the ipkdb_if structure,
			  the attach routine must initialize the following fields:

				myenetaddr  fill this with the own ethernet address of the
				flags	    mark at least IPKDB_MYHW here
				name	    name of the device, only used for a message
				start	    routine called every time ipkdb is entered
				leave	    routine called every time ipkdb is left
				receive     routine called to receive a packet
				send	    routine called to send a packet

			  Additional fields that may be set are:

				myinetaddr  fill this with the own internet address, and mark
					    IPKDB_MYIP in flags
				port	    may be used as a pointer to some device
     ipkdbfbyte(c)	  This routine should fetch a byte from address c.  It must not enter any
			  trap handling code, but instead return -1 on inability to access the
     ipkdbsbyte(c, i)	  This routine should set the byte pointed to by c to the value given as
			  i.  The routine must not enter any trap handling code.  Furthermore it
			  should reset the modification bit in the relevant page table entry to
			  the value before the store.

     ipkdb(4), boothowto(9)

BSD					September 4, 2009				      BSD
Unix & Linux Commands & Man Pages : ©2000 - 2018 Unix and Linux Forums

All times are GMT -4. The time now is 06:12 PM.