]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.sbin/pim6sd/pim6_proto.h
Add the '-l' flag to nghook which loops the received data back.
[FreeBSD/FreeBSD.git] / usr.sbin / pim6sd / pim6_proto.h
1 /*
2  *  Copyright (c) 1998 by the University of Southern California.
3  *  All rights reserved.
4  *
5  *  Permission to use, copy, modify, and distribute this software and
6  *  its documentation in source and binary forms for lawful
7  *  purposes and without fee is hereby granted, provided
8  *  that the above copyright notice appear in all copies and that both
9  *  the copyright notice and this permission notice appear in supporting
10  *  documentation, and that any documentation, advertising materials,
11  *  and other materials related to such distribution and use acknowledge
12  *  that the software was developed by the University of Southern
13  *  California and/or Information Sciences Institute.
14  *  The name of the University of Southern California may not
15  *  be used to endorse or promote products derived from this software
16  *  without specific prior written permission.
17  *
18  *  THE UNIVERSITY OF SOUTHERN CALIFORNIA DOES NOT MAKE ANY REPRESENTATIONS
19  *  ABOUT THE SUITABILITY OF THIS SOFTWARE FOR ANY PURPOSE.  THIS SOFTWARE IS
20  *  PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES,
21  *  INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
22  *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, TITLE, AND
23  *  NON-INFRINGEMENT.
24  *
25  *  IN NO EVENT SHALL USC, OR ANY OTHER CONTRIBUTOR BE LIABLE FOR ANY
26  *  SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES, WHETHER IN CONTRACT,
27  *  TORT, OR OTHER FORM OF ACTION, ARISING OUT OF OR IN CONNECTION WITH,
28  *  THE USE OR PERFORMANCE OF THIS SOFTWARE.
29  *
30  *  Other copyrights might apply to parts of this software and are so
31  *  noted when applicable.
32  */
33 /*  Questions concerning this software should be directed to
34  *  Mickael Hoerdt (hoerdt@clarinet.u-strasbg.fr) LSIIT Strasbourg.
35  *
36  */
37 /*
38  * This program has been derived from pim6dd.        
39  * The pim6dd program is covered by the license in the accompanying file
40  * named "LICENSE.pim6dd".
41  */
42 /*
43  * This program has been derived from pimd.        
44  * The pimd program is covered by the license in the accompanying file
45  * named "LICENSE.pimd".
46  *
47  * $FreeBSD$
48  */
49
50
51 #ifndef PIM6_PROTO_H
52 #define PIM6_PROTO_H
53 #include "defs.h"
54 #include "vif.h"
55 #include "mrt.h"
56
57 extern build_jp_message_t *build_jp_message_pool;
58 extern int               build_jp_message_pool_counter;
59 extern struct sockaddr_in6 sockaddr6_any;
60 extern struct sockaddr_in6 sockaddr6_d;
61
62 extern int receive_pim6_hello         __P((struct sockaddr_in6 *src,
63                        char *pim_message, int datalen));
64
65 extern int send_pim6_hello            __P((struct uvif *v, u_int16 holdtime));
66 extern void delete_pim6_nbr           __P((pim_nbr_entry_t *nbr_delete));
67
68 extern int  receive_pim6_register    __P((struct sockaddr_in6 *src, struct sockaddr_in6 *dst,
69                          char *pim_message, int datalen));
70 extern int  send_pim6_null_register  __P((mrtentry_t *r));
71 extern int  receive_pim6_register_stop __P((struct sockaddr_in6 *src, struct sockaddr_in6 *dst,
72                            char *pim_message,
73                            int datalen));
74 extern int  send_pim6_register   __P((char *pkt));
75 extern int  receive_pim6_join_prune  __P((struct sockaddr_in6 *src, struct sockaddr_in6 *dst,
76                          char *pim_message, int datalen));
77 extern int  join_or_prune       __P((mrtentry_t *mrtentry_ptr,  
78                          pim_nbr_entry_t *upstream_router));
79 extern int  receive_pim6_assert  __P((struct sockaddr_in6 *src, struct sockaddr_in6 *dst,
80                          char *pim_message, int datalen));
81 extern int  send_pim6_assert     __P((struct sockaddr_in6 *source, struct sockaddr_in6 *group,
82                          vifi_t vifi,
83                          mrtentry_t *mrtentry_ptr));
84 extern int  send_periodic_pim6_join_prune __P((vifi_t vifi, 
85                           pim_nbr_entry_t *pim_nbr,
86                           u_int16 holdtime));
87 extern int  add_jp_entry        __P((pim_nbr_entry_t *pim_nbr,
88                          u_int16 holdtime, struct sockaddr_in6 *group,
89                          u_int8 grp_msklen, struct sockaddr_in6 *source,  
90                          u_int8 src_msklen,
91                          u_int16 addr_flags,  
92                          u_int8 join_prune));
93 extern void pack_and_send_jp6_message __P((pim_nbr_entry_t *pim_nbr));
94 extern int  receive_pim6_cand_rp_adv __P((struct sockaddr_in6 *src, struct sockaddr_in6 *dst,
95                          char *pim_message, int datalen));
96 extern int  receive_pim6_bootstrap   __P((struct sockaddr_in6 *src, struct sockaddr_in6 *dst,
97                          char *pim_message, int datalen));
98 extern int  send_pim6_cand_rp_adv    __P((void));
99 extern void send_pim6_bootstrap  __P((void));
100
101
102 #endif