1*0147868eSNuno Antunes 2*0147868eSNuno Antunes /* 3*0147868eSNuno Antunes * netgraph.h 4*0147868eSNuno Antunes * 5*0147868eSNuno Antunes * Copyright (c) 1996-1999 Whistle Communications, Inc. 6*0147868eSNuno Antunes * All rights reserved. 7*0147868eSNuno Antunes * 8*0147868eSNuno Antunes * Subject to the following obligations and disclaimer of warranty, use and 9*0147868eSNuno Antunes * redistribution of this software, in source or object code forms, with or 10*0147868eSNuno Antunes * without modifications are expressly permitted by Whistle Communications; 11*0147868eSNuno Antunes * provided, however, that: 12*0147868eSNuno Antunes * 1. Any and all reproductions of the source or object code must include the 13*0147868eSNuno Antunes * copyright notice above and the following disclaimer of warranties; and 14*0147868eSNuno Antunes * 2. No rights are granted, in any manner or form, to use Whistle 15*0147868eSNuno Antunes * Communications, Inc. trademarks, including the mark "WHISTLE 16*0147868eSNuno Antunes * COMMUNICATIONS" on advertising, endorsements, or otherwise except as 17*0147868eSNuno Antunes * such appears in the above copyright notice or in the software. 18*0147868eSNuno Antunes * 19*0147868eSNuno Antunes * THIS SOFTWARE IS BEING PROVIDED BY WHISTLE COMMUNICATIONS "AS IS", AND 20*0147868eSNuno Antunes * TO THE MAXIMUM EXTENT PERMITTED BY LAW, WHISTLE COMMUNICATIONS MAKES NO 21*0147868eSNuno Antunes * REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING THIS SOFTWARE, 22*0147868eSNuno Antunes * INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED WARRANTIES OF 23*0147868eSNuno Antunes * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. 24*0147868eSNuno Antunes * WHISTLE COMMUNICATIONS DOES NOT WARRANT, GUARANTEE, OR MAKE ANY 25*0147868eSNuno Antunes * REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS OF THE USE OF THIS 26*0147868eSNuno Antunes * SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY OR OTHERWISE. 27*0147868eSNuno Antunes * IN NO EVENT SHALL WHISTLE COMMUNICATIONS BE LIABLE FOR ANY DAMAGES 28*0147868eSNuno Antunes * RESULTING FROM OR ARISING OUT OF ANY USE OF THIS SOFTWARE, INCLUDING 29*0147868eSNuno Antunes * WITHOUT LIMITATION, ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, 30*0147868eSNuno Antunes * PUNITIVE, OR CONSEQUENTIAL DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR 31*0147868eSNuno Antunes * SERVICES, LOSS OF USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY 32*0147868eSNuno Antunes * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 33*0147868eSNuno Antunes * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 34*0147868eSNuno Antunes * THIS SOFTWARE, EVEN IF WHISTLE COMMUNICATIONS IS ADVISED OF THE POSSIBILITY 35*0147868eSNuno Antunes * OF SUCH DAMAGE. 36*0147868eSNuno Antunes * 37*0147868eSNuno Antunes * Author: Archie Cobbs <archie@whistle.com> 38*0147868eSNuno Antunes * 39*0147868eSNuno Antunes * $FreeBSD: src/lib/libnetgraph/netgraph.h,v 1.4 2004/01/27 20:25:14 ru Exp $ 40*0147868eSNuno Antunes * $DragonFly: src/lib/libnetgraph/netgraph.h,v 1.2 2003/06/17 04:26:50 dillon Exp $ 41*0147868eSNuno Antunes * $Whistle: netgraph.h,v 1.7 1999/01/20 00:57:23 archie Exp $ 42*0147868eSNuno Antunes */ 43*0147868eSNuno Antunes 44*0147868eSNuno Antunes #ifndef _NETGRAPH_H_ 45*0147868eSNuno Antunes #define _NETGRAPH_H_ 46*0147868eSNuno Antunes 47*0147868eSNuno Antunes #include <sys/types.h> 48*0147868eSNuno Antunes #include <netgraph7/ng_message.h> 49*0147868eSNuno Antunes 50*0147868eSNuno Antunes __BEGIN_DECLS 51*0147868eSNuno Antunes int NgMkSockNode(const char *, int *, int *); 52*0147868eSNuno Antunes int NgNameNode(int, const char *, const char *, ...) __printflike(3, 4); 53*0147868eSNuno Antunes int NgSendMsg(int, const char *, int, int, const void *, size_t); 54*0147868eSNuno Antunes int NgSendAsciiMsg(int, const char *, const char *, ...) __printflike(3, 4); 55*0147868eSNuno Antunes int NgSendReplyMsg(int, const char *, 56*0147868eSNuno Antunes const struct ng_mesg *, const void *, size_t); 57*0147868eSNuno Antunes int NgRecvMsg(int, struct ng_mesg *, size_t, char *); 58*0147868eSNuno Antunes int NgAllocRecvMsg(int, struct ng_mesg **, char *); 59*0147868eSNuno Antunes int NgRecvAsciiMsg(int, struct ng_mesg *, size_t, char *); 60*0147868eSNuno Antunes int NgAllocRecvAsciiMsg(int, struct ng_mesg **, char *); 61*0147868eSNuno Antunes int NgSendData(int, const char *, const u_char *, size_t); 62*0147868eSNuno Antunes int NgRecvData(int, u_char *, size_t, char *); 63*0147868eSNuno Antunes int NgAllocRecvData(int, u_char **, char *); 64*0147868eSNuno Antunes int NgSetDebug(int); 65*0147868eSNuno Antunes void NgSetErrLog(void (*)(const char *fmt, ...), 66*0147868eSNuno Antunes void (*)(const char *fmt, ...)); 67*0147868eSNuno Antunes __END_DECLS 68*0147868eSNuno Antunes 69*0147868eSNuno Antunes #endif 70*0147868eSNuno Antunes 71