ngctl (53913) | ngctl (120612) |
---|---|
1# $FreeBSD: head/share/examples/netgraph/ngctl 53913 1999-11-30 02:45:32Z archie $ | 1# $FreeBSD: head/share/examples/netgraph/ngctl 120612 2003-09-30 22:39:22Z julian $ |
2 3# 4# This is an example that shows how to send ASCII formatted control 5# messages to a node using ngctl(8). 6# 7# What we will do here create a divert(4) tap. This simply dumps 8# out all packets diverted by some ipfw(8) divert rule to the console. 9# --- 16 unchanged lines hidden (view full) --- 26 rmhook Disconnect hook "hook" of the node at "path" 27 show Show information about the node at <path> 28 shutdown Shutdown the node at <path> 29 status Get human readable status information from the node at <path> 30 types Show information about all installed node types 31 quit Exit program 32 + 33 | 2 3# 4# This is an example that shows how to send ASCII formatted control 5# messages to a node using ngctl(8). 6# 7# What we will do here create a divert(4) tap. This simply dumps 8# out all packets diverted by some ipfw(8) divert rule to the console. 9# --- 16 unchanged lines hidden (view full) --- 26 rmhook Disconnect hook "hook" of the node at "path" 27 show Show information about the node at <path> 28 shutdown Shutdown the node at <path> 29 status Get human readable status information from the node at <path> 30 types Show information about all installed node types 31 quit Exit program 32 + 33 |
34# Now let's create a ng_ksocket(8) node, in the family PF_INET, | 34# Now let's create a ng_ksocket(4) node, in the family PF_INET, |
35# of type SOCK_RAW, and protocol IPPROTO_DIVERT: 36 37 + mkpeer ksocket foo inet/raw/divert 38 39# Note that ``foo'' is the hook name on the socket node, which can be 40# anything. The ``inet/raw/divert'' is the hook name on the ksocket 41# node, which tells it what kind of socket to create. 42 --- 131 unchanged lines hidden --- | 35# of type SOCK_RAW, and protocol IPPROTO_DIVERT: 36 37 + mkpeer ksocket foo inet/raw/divert 38 39# Note that ``foo'' is the hook name on the socket node, which can be 40# anything. The ``inet/raw/divert'' is the hook name on the ksocket 41# node, which tells it what kind of socket to create. 42 --- 131 unchanged lines hidden --- |