diff options
Diffstat (limited to 'lib/libnetgraph/netgraph.3')
-rw-r--r-- | lib/libnetgraph/netgraph.3 | 41 |
1 files changed, 40 insertions, 1 deletions
diff --git a/lib/libnetgraph/netgraph.3 b/lib/libnetgraph/netgraph.3 index 852017019e48..108775e62754 100644 --- a/lib/libnetgraph/netgraph.3 +++ b/lib/libnetgraph/netgraph.3 @@ -35,16 +35,22 @@ .\" $FreeBSD$ .\" $Whistle: netgraph.3,v 1.7 1999/01/25 07:14:06 archie Exp $ .\" -.Dd January 19, 1999 +.Dd January 27, 2004 .Dt NETGRAPH 3 .Os .Sh NAME .Nm NgMkSockNode , .Nm NgNameNode , .Nm NgSendMsg , +.Nm NgSendAsciiMsg , +.Nm NgSendMsgReply , .Nm NgRecvMsg , +.Nm NgAllocRecvMsg , +.Nm NgRecvAsciiMsg , +.Nm NgAllocRecvAsciiMsg , .Nm NgSendData , .Nm NgRecvData , +.Nm NgAllocRecvData , .Nm NgSetDebug , .Nm NgSetErrLog .Nd netgraph user library @@ -71,12 +77,18 @@ .Ft int .Fn NgRecvMsg "int cs" "struct ng_mesg *rep" "size_t replen" "char *path" .Ft int +.Fn NgAllocRecvMsg "int cs" "struct ng_mesg **rep" "char *path" +.Ft int .Fn NgRecvAsciiMsg "int cs" "struct ng_mesg *rep" "size_t replen" "char *path" .Ft int +.Fn NgAllocRecvAsciiMsg "int cs" "struct ng_mesg **rep" "char *path" +.Ft int .Fn NgSendData "int ds" "const char *hook" "const u_char *buf" "size_t len" .Ft int .Fn NgRecvData "int ds" "u_char *buf" "size_t len" "char *hook" .Ft int +.Fn NgAllocRecvData "int ds" "u_char **buf" "char *hook" +.Ft int .Fn NgSetDebug "int level" .Ft void .Fo NgSetErrLog @@ -204,6 +216,15 @@ The length of the control message is returned. A return value of zero indicates that the socket was closed. .Pp The +.Fn NgAllocRecvMsg +function works exactly like +.Fn NgRecvMsg , +except that the buffer for a message is dynamically allocated +to guarantee that a message is not truncated. +The size of the buffer is equal to the socket's receive buffer size. +The caller is responsible for freeing the buffer when it is no longer required. +.Pp +The .Fn NgRecvAsciiMsg function works exactly like .Fn NgRecvMsg , @@ -222,6 +243,15 @@ version of the arguments (and the reply header argument length field will be adjusted). .Pp The +.Fn NgAllocRecvAsciiMsg +function works exactly like +.Fn NgRecvAsciiMsg , +except that the buffer for a message is dynamically allocated +to guarantee that a message is not truncated. +The size of the buffer is equal to the socket's receive buffer size. +The caller is responsible for freeing the buffer when it is no longer required. +.Pp +The .Fn NgSendData function writes a data packet out on the specified hook of the node corresponding to data socket @@ -252,6 +282,15 @@ The length of the packet is returned. A return value of zero indicates that the socket was closed. .Pp The +.Fn NgAllocRecvData +function works exactly like +.Fn NgRecvData , +except that the buffer for a data packet is dynamically allocated +to guarantee that a data packet is not truncated. +The size of the buffer is equal to the socket's receive buffer size. +The caller is responsible for freeing the buffer when it is no longer required. +.Pp +The .Fn NgSetDebug and .Fn NgSetErrLog |