Annotation of embedaddon/libpdel/ppp/ppp_node.h, revision 1.1.1.1

1.1       misho       1: 
                      2: /*
                      3:  * Copyright (c) 2001-2002 Packet Design, LLC.
                      4:  * All rights reserved.
                      5:  * 
                      6:  * Subject to the following obligations and disclaimer of warranty,
                      7:  * use and redistribution of this software, in source or object code
                      8:  * forms, with or without modifications are expressly permitted by
                      9:  * Packet Design; provided, however, that:
                     10:  * 
                     11:  *    (i)  Any and all reproductions of the source or object code
                     12:  *         must include the copyright notice above and the following
                     13:  *         disclaimer of warranties; and
                     14:  *    (ii) No rights are granted, in any manner or form, to use
                     15:  *         Packet Design trademarks, including the mark "PACKET DESIGN"
                     16:  *         on advertising, endorsements, or otherwise except as such
                     17:  *         appears in the above copyright notice or in the software.
                     18:  * 
                     19:  * THIS SOFTWARE IS BEING PROVIDED BY PACKET DESIGN "AS IS", AND
                     20:  * TO THE MAXIMUM EXTENT PERMITTED BY LAW, PACKET DESIGN MAKES NO
                     21:  * REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, REGARDING
                     22:  * THIS SOFTWARE, INCLUDING WITHOUT LIMITATION, ANY AND ALL IMPLIED
                     23:  * WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
                     24:  * OR NON-INFRINGEMENT.  PACKET DESIGN DOES NOT WARRANT, GUARANTEE,
                     25:  * OR MAKE ANY REPRESENTATIONS REGARDING THE USE OF, OR THE RESULTS
                     26:  * OF THE USE OF THIS SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY,
                     27:  * RELIABILITY OR OTHERWISE.  IN NO EVENT SHALL PACKET DESIGN BE
                     28:  * LIABLE FOR ANY DAMAGES RESULTING FROM OR ARISING OUT OF ANY USE
                     29:  * OF THIS SOFTWARE, INCLUDING WITHOUT LIMITATION, ANY DIRECT,
                     30:  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, PUNITIVE, OR CONSEQUENTIAL
                     31:  * DAMAGES, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, LOSS OF
                     32:  * USE, DATA OR PROFITS, HOWEVER CAUSED AND UNDER ANY THEORY OF
                     33:  * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
                     34:  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
                     35:  * THE USE OF THIS SOFTWARE, EVEN IF PACKET DESIGN IS ADVISED OF
                     36:  * THE POSSIBILITY OF SUCH DAMAGE.
                     37:  *
                     38:  * Author: Archie Cobbs <archie@freebsd.org>
                     39:  */
                     40: 
                     41: #ifndef _PDEL_PPP_PPP_NODE_H_
                     42: #define _PDEL_PPP_PPP_NODE_H_
                     43: 
                     44: struct ppp_node;
                     45: struct ppp_log;
                     46: 
                     47: typedef void   ppp_node_recv_t(void *arg, u_int link_num, u_int16_t proto,
                     48:                        u_char *data, size_t len);
                     49: 
                     50: typedef void   ppp_node_recvmsg_t(void *arg, struct ng_mesg *msg);
                     51: 
                     52: __BEGIN_DECLS
                     53: 
                     54: /* Functions */
                     55: extern struct  ppp_node *ppp_node_create(struct pevent_ctx *ev_ctx,
                     56:                        pthread_mutex_t *mutex, struct ppp_log *log);
                     57: extern void    ppp_node_destroy(struct ppp_node **nodep);
                     58: extern int     ppp_node_write(struct ppp_node *node, u_int link_num,
                     59:                        u_int16_t proto, const void *data, size_t len);
                     60: extern int     ppp_node_connect(struct ppp_node *node, u_int link_num,
                     61:                        const char *path, const char *hook);
                     62: extern int     ppp_node_disconnect(struct ppp_node *node, u_int link_num);
                     63: 
                     64: extern const   char *ppp_node_get_path(struct ppp_node *node);
                     65: extern int     ppp_node_get_config(struct ppp_node *node,
                     66:                        struct ng_ppp_node_conf *conf);
                     67: extern int     ppp_node_set_config(struct ppp_node *node,
                     68:                        const struct ng_ppp_node_conf *conf);
                     69: extern int     ppp_node_send_msg(struct ppp_node *node,
                     70:                        const char *relpath, u_int32_t cookie, u_int32_t cmd,
                     71:                        const void *payload, size_t plen);
                     72: extern int     ppp_node_recv_msg(struct ppp_node *node,
                     73:                        struct ng_mesg *msg, size_t mlen, char *raddr);
                     74: extern void    ppp_node_set_recv(struct ppp_node *node,
                     75:                        ppp_node_recv_t *recv, void *arg);
                     76: extern int     ppp_node_set_recvmsg(struct ppp_node *node,
                     77:                        u_int32_t cookie, u_int32_t cmd,
                     78:                        ppp_node_recvmsg_t *recvmsg, void *arg);
                     79: 
                     80: __END_DECLS
                     81: 
                     82: #endif /* _PDEL_PPP_PPP_NODE_H_ */

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>