netgraph.4 (c2d03ea87913b49c09051746bb4ab5b45c80c49a) | netgraph.4 (5e75e35cca2eb446c514ea7c13a6be832fc8602a) |
---|---|
1.\" Copyright (c) 1996-1999 Whistle Communications, Inc. 2.\" All rights reserved. 3.\" 4.\" Subject to the following obligations and disclaimer of warranty, use and 5.\" redistribution of this software, in source or object code forms, with or 6.\" without modifications are expressly permitted by Whistle Communications; 7.\" provided, however, that: 8.\" 1. Any and all reproductions of the source or object code must include the --- 337 unchanged lines hidden (view full) --- 346This method allows a node to clean up 347and to ensure that any actions that need to be performed 348at this time are taken. The method is called by the generic (i.e., superclass) 349node destructor which will get rid of the generic components of the node. 350Some nodes (usually associated with a piece of hardware) may be 351.Em persistent 352in that a shutdown breaks all edges and resets the node, 353but doesn't remove it. In this case the shutdown method should not | 1.\" Copyright (c) 1996-1999 Whistle Communications, Inc. 2.\" All rights reserved. 3.\" 4.\" Subject to the following obligations and disclaimer of warranty, use and 5.\" redistribution of this software, in source or object code forms, with or 6.\" without modifications are expressly permitted by Whistle Communications; 7.\" provided, however, that: 8.\" 1. Any and all reproductions of the source or object code must include the --- 337 unchanged lines hidden (view full) --- 346This method allows a node to clean up 347and to ensure that any actions that need to be performed 348at this time are taken. The method is called by the generic (i.e., superclass) 349node destructor which will get rid of the generic components of the node. 350Some nodes (usually associated with a piece of hardware) may be 351.Em persistent 352in that a shutdown breaks all edges and resets the node, 353but doesn't remove it. In this case the shutdown method should not |
354free it's resources, but rather, clean up and then clear the | 354free its resources, but rather, clean up and then clear the |
355.Em NG_INVALID 356flag to signal the generic code that the shutdown is aborted. In 357the case where the shutdown is started by the node itself due to hardware 358removal or unloading, (via ng_rmnode_self()) it should set the 359.Em NG_REALLY_DIE | 355.Em NG_INVALID 356flag to signal the generic code that the shutdown is aborted. In 357the case where the shutdown is started by the node itself due to hardware 358removal or unloading, (via ng_rmnode_self()) it should set the 359.Em NG_REALLY_DIE |
360flag to signal to it's own shutdown method that it is not to persist. | 360flag to signal to its own shutdown method that it is not to persist. |
361.El 362.Sh Sending and Receiving Data 363Two other methods are also supported by all nodes: 364.Bl -tag -width xxx 365.It Receive data message 366A 367.Em Netgraph queueable reqest item , 368usually refered to as an --- 53 unchanged lines hidden (view full) --- 422.Nm 423NETISR system (see below). It achieves this by setting the 424.Dv HK_QUEUE 425flag in the flags word of the hook on which that data will arrive. 426The infrastructure will respect that bit and queue the data for delivery at 427a later time, rather than deliver it directly. A node may decide to set 428the bit on the 429.Em peer | 361.El 362.Sh Sending and Receiving Data 363Two other methods are also supported by all nodes: 364.Bl -tag -width xxx 365.It Receive data message 366A 367.Em Netgraph queueable reqest item , 368usually refered to as an --- 53 unchanged lines hidden (view full) --- 422.Nm 423NETISR system (see below). It achieves this by setting the 424.Dv HK_QUEUE 425flag in the flags word of the hook on which that data will arrive. 426The infrastructure will respect that bit and queue the data for delivery at 427a later time, rather than deliver it directly. A node may decide to set 428the bit on the 429.Em peer |
430node, so that it's own output packets are queued. This is used | 430node, so that its own output packets are queued. This is used |
431by device drivers running at different processor priorities to transfer 432packet delivery to the splnet() level at which the bulk of 433.Nm 434runs. 435.Pp 436The structure and use of meta-data is still experimental, but is 437presently used in frame-relay to indicate that management packets 438should be queued for transmission --- 935 unchanged lines hidden --- | 431by device drivers running at different processor priorities to transfer 432packet delivery to the splnet() level at which the bulk of 433.Nm 434runs. 435.Pp 436The structure and use of meta-data is still experimental, but is 437presently used in frame-relay to indicate that management packets 438should be queued for transmission --- 935 unchanged lines hidden --- |