diff options
author | julian <julian@FreeBSD.org> | 2004-06-25 19:22:05 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 2004-06-25 19:22:05 +0000 |
commit | dfb6d511956c2a209c86265e60dde6f108cf61b3 (patch) | |
tree | e6486f45de5c63b28a090942d8f046694d0329cb /share | |
parent | d754d951b906e8d0c99ea9917952cdfb8c5c9378 (diff) | |
download | FreeBSD-src-dfb6d511956c2a209c86265e60dde6f108cf61b3.zip FreeBSD-src-dfb6d511956c2a209c86265e60dde6f108cf61b3.tar.gz |
Convert Netgraph to use mbuf tags to pass its meta information around.
Thanks to Sam for importing tags in a way that allowed this to be done.
Submitted by: Gleb Smirnoff <glebius@cell.sick.ru>
Also allow the sr and ar drivers to create netgraph versions of their modules.
Document the change to the ksocket node.
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man4/ng_ksocket.4 | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/share/man/man4/ng_ksocket.4 b/share/man/man4/ng_ksocket.4 index 3f2d3b2..373a25e 100644 --- a/share/man/man4/ng_ksocket.4 +++ b/share/man/man4/ng_ksocket.4 @@ -34,7 +34,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 15, 1999 +.Dd June 8, 2004 .Dt NG_KSOCKET 4 .Os .Sh NAME @@ -88,6 +88,24 @@ well. For example .Dv inet/dgram/udp is a more readable but equivalent version of .Dv 2/2/17 . +.Pp +Data received into socket is sent out via hook. +Data received on hook is sent out from socket, if the latter is +connected (an +.Dv NGM_KSOCKET_CONNECT +was sent to node before). +If socket is not connected, destination +.Dv "struct sockaddr" +must be supplied in an mbuf tag with cookie +.Dv NGM_KSOCKET_COOKIE +and type +.Dv NG_KSOCKET_TAG_SOCKADDR +attached to data. +Otherwise +.Nm +will return +.Dv ENOTCONN +to sender. .Sh CONTROL MESSAGES This node type supports the generic control messages, plus the following: .Bl -tag -width foo @@ -190,7 +208,8 @@ Shutdown of the node closes the associated socket. .Xr socket 2 , .Xr netgraph 4 , .Xr ng_socket 4 , -.Xr ngctl 8 +.Xr ngctl 8 , +.Xr mbuf_tags 9 .Sh HISTORY The .Nm |