defs.h (18322) | defs.h (19885) |
---|---|
1/* 2 * Copyright (c) 1983, 1988, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)defs.h 8.1 (Berkeley) 6/5/93 | 1/* 2 * Copyright (c) 1983, 1988, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)defs.h 8.1 (Berkeley) 6/5/93 |
34 * $Id$ | 34 * $Id: defs.h,v 1.2 1996/09/16 17:03:29 wollman Exp $ |
35 */ 36 | 35 */ 36 |
37#ifndef __NetBSD__ 38#ident "$Revision: 1.1.1.1 $" 39#endif 40 | |
41/* Definitions for RIPv2 routing process. 42 * 43 * This code is based on the 4.4BSD `routed` daemon, with extensions to 44 * support: 45 * RIPv2, including variable length subnet masks. 46 * Router Discovery 47 * aggregate routes in the kernel tables. 48 * aggregate advertised routes. --- 40 unchanged lines hidden (view full) --- 89#include <net/if.h> 90#include <net/route.h> 91#include <net/if_dl.h> 92#include <netinet/in.h> 93#include <arpa/inet.h> 94#define RIPVERSION RIPv2 95#include <protocols/routed.h> 96 | 37/* Definitions for RIPv2 routing process. 38 * 39 * This code is based on the 4.4BSD `routed` daemon, with extensions to 40 * support: 41 * RIPv2, including variable length subnet masks. 42 * Router Discovery 43 * aggregate routes in the kernel tables. 44 * aggregate advertised routes. --- 40 unchanged lines hidden (view full) --- 85#include <net/if.h> 86#include <net/route.h> 87#include <net/if_dl.h> 88#include <netinet/in.h> 89#include <arpa/inet.h> 90#define RIPVERSION RIPv2 91#include <protocols/routed.h> 92 |
93#ifdef sgi 94#define USE_PASSIFNAME 95#endif |
|
97 | 96 |
97 |
|
98/* Type of an IP address. 99 * Some systems do not like to pass structures, so do not use in_addr. 100 * Some systems think a long has 64 bits, which would be a gross waste. 101 * So define it here so it can be changed for the target system. 102 * It should be defined somewhere netinet/in.h, but it is not. 103 */ 104#ifdef sgi 105#define naddr __uint32_t --- 19 unchanged lines hidden (view full) --- 125 * turned off. These must be less than STALE_TIME. 126 */ 127#define CHECK_BAD_INTERVAL 5 /* when an interface is known bad */ 128#define CHECK_ACT_INTERVAL 30 /* when advertising */ 129#define CHECK_QUIET_INTERVAL 300 /* when not */ 130 131#define LIM_SEC(s,l) ((s).tv_sec = MIN((s).tv_sec, (l))) 132 | 98/* Type of an IP address. 99 * Some systems do not like to pass structures, so do not use in_addr. 100 * Some systems think a long has 64 bits, which would be a gross waste. 101 * So define it here so it can be changed for the target system. 102 * It should be defined somewhere netinet/in.h, but it is not. 103 */ 104#ifdef sgi 105#define naddr __uint32_t --- 19 unchanged lines hidden (view full) --- 125 * turned off. These must be less than STALE_TIME. 126 */ 127#define CHECK_BAD_INTERVAL 5 /* when an interface is known bad */ 128#define CHECK_ACT_INTERVAL 30 /* when advertising */ 129#define CHECK_QUIET_INTERVAL 300 /* when not */ 130 131#define LIM_SEC(s,l) ((s).tv_sec = MIN((s).tv_sec, (l))) 132 |
133/* Metric used for fake default routes. It ought to be 15, but when 134 * processing advertised routes, previous versions of `routed` added 135 * to the received metric and discarded the route if the total was 16 136 * or larger. 137 */ 138#define FAKE_METRIC (HOPCNT_INFINITY-2) |
|
133 | 139 |
140 |
|
134/* Router Discovery parameters */ 135#ifndef sgi 136#define INADDR_ALLROUTERS_GROUP 0xe0000002 /* 224.0.0.2 */ 137#endif 138#define MaxMaxAdvertiseInterval 1800 139#define MinMaxAdvertiseInterval 4 140#define DefMaxAdvertiseInterval 600 141#define DEF_PreferenceLevel 0 142#define MIN_PreferenceLevel 0x80000000 143 144#define MAX_INITIAL_ADVERT_INTERVAL 16 145#define MAX_INITIAL_ADVERTS 3 146#define MAX_RESPONSE_DELAY 2 147 148#define MAX_SOLICITATION_DELAY 1 149#define SOLICITATION_INTERVAL 3 150#define MAX_SOLICITATIONS 3 151 152 | 141/* Router Discovery parameters */ 142#ifndef sgi 143#define INADDR_ALLROUTERS_GROUP 0xe0000002 /* 224.0.0.2 */ 144#endif 145#define MaxMaxAdvertiseInterval 1800 146#define MinMaxAdvertiseInterval 4 147#define DefMaxAdvertiseInterval 600 148#define DEF_PreferenceLevel 0 149#define MIN_PreferenceLevel 0x80000000 150 151#define MAX_INITIAL_ADVERT_INTERVAL 16 152#define MAX_INITIAL_ADVERTS 3 153#define MAX_RESPONSE_DELAY 2 154 155#define MAX_SOLICITATION_DELAY 1 156#define SOLICITATION_INTERVAL 3 157#define MAX_SOLICITATIONS 3 158 159 |
160/* Bloated packet size for systems that simply add authentication to 161 * full-sized packets 162 */ 163#define OVER_MAXPACKETSIZE (MAXPACKETSIZE+sizeof(struct netinfo)*2) |
|
153/* typical packet buffers */ 154union pkt_buf { | 164/* typical packet buffers */ 165union pkt_buf { |
155 char packet[MAXPACKETSIZE+1]; | 166 char packet[OVER_MAXPACKETSIZE*2]; |
156 struct rip rip; 157}; 158 159 | 167 struct rip rip; 168}; 169 170 |
160/* no more routes than this, to protect ourself in case something goes 161 * whacko and starts broadcast zillions of bogus routes. | 171/* No more routes than this, to protect ourself in case something goes 172 * whacko and starts broadcasting zillions of bogus routes. |
162 */ 163#define MAX_ROUTES (128*1024) 164extern int total_routes; 165 166/* Main, daemon routing table structure 167 */ 168struct rt_entry { 169 struct radix_node rt_nodes[2]; /* radix tree glue */ --- 67 unchanged lines hidden (view full) --- 237 && (rt)->rt_dst == (A)->rts_router \ 238 && (A)->rts_metric == (B)->rts_metric))) 239 240 241/* An "interface" is similar to a kernel ifnet structure, except it also 242 * handles "logical" or "IS_REMOTE" interfaces (remote gateways). 243 */ 244struct interface { | 173 */ 174#define MAX_ROUTES (128*1024) 175extern int total_routes; 176 177/* Main, daemon routing table structure 178 */ 179struct rt_entry { 180 struct radix_node rt_nodes[2]; /* radix tree glue */ --- 67 unchanged lines hidden (view full) --- 248 && (rt)->rt_dst == (A)->rts_router \ 249 && (A)->rts_metric == (B)->rts_metric))) 250 251 252/* An "interface" is similar to a kernel ifnet structure, except it also 253 * handles "logical" or "IS_REMOTE" interfaces (remote gateways). 254 */ 255struct interface { |
245 struct interface *int_next, *int_prev; | 256 struct interface *int_next, **int_prev; 257 struct interface *int_ahash, **int_ahash_prev; 258 struct interface *int_bhash, **int_bhash_prev; 259 struct interface *int_rlink, **int_rlink_prev; 260 struct interface *int_nhash, **int_nhash_prev; |
246 char int_name[IFNAMSIZ+15+1]; /* big enough for IS_REMOTE */ 247 u_short int_index; 248 naddr int_addr; /* address on this host (net order) */ 249 naddr int_brdaddr; /* broadcast address (n) */ 250 naddr int_dstaddr; /* other end of pt-to-pt link (n) */ 251 naddr int_net; /* working network # (host order)*/ 252 naddr int_mask; /* working net mask (host order) */ 253 naddr int_ripv1_mask; /* for inferring a mask (n) */ 254 naddr int_std_addr; /* class A/B/C address (n) */ 255 naddr int_std_net; /* class A/B/C network (h) */ 256 naddr int_std_mask; /* class A/B/C netmask (h) */ 257 int int_rip_sock; /* for queries */ 258 int int_if_flags; /* some bits copied from kernel */ 259 u_int int_state; 260 time_t int_act_time; /* last thought healthy */ | 261 char int_name[IFNAMSIZ+15+1]; /* big enough for IS_REMOTE */ 262 u_short int_index; 263 naddr int_addr; /* address on this host (net order) */ 264 naddr int_brdaddr; /* broadcast address (n) */ 265 naddr int_dstaddr; /* other end of pt-to-pt link (n) */ 266 naddr int_net; /* working network # (host order)*/ 267 naddr int_mask; /* working net mask (host order) */ 268 naddr int_ripv1_mask; /* for inferring a mask (n) */ 269 naddr int_std_addr; /* class A/B/C address (n) */ 270 naddr int_std_net; /* class A/B/C network (h) */ 271 naddr int_std_mask; /* class A/B/C netmask (h) */ 272 int int_rip_sock; /* for queries */ 273 int int_if_flags; /* some bits copied from kernel */ 274 u_int int_state; 275 time_t int_act_time; /* last thought healthy */ |
276 time_t int_query_time; |
|
261 u_short int_transitions; /* times gone up-down */ 262 char int_metric; 263 char int_d_metric; /* for faked default route */ 264 struct int_data { 265 u_int ipackets; /* previous network stats */ 266 u_int ierrors; 267 u_int opackets; 268 u_int oerrors; 269#ifdef sgi 270 u_int odrops; 271#endif 272 time_t ts; /* timestamp on network stats */ 273 } int_data; | 277 u_short int_transitions; /* times gone up-down */ 278 char int_metric; 279 char int_d_metric; /* for faked default route */ 280 struct int_data { 281 u_int ipackets; /* previous network stats */ 282 u_int ierrors; 283 u_int opackets; 284 u_int oerrors; 285#ifdef sgi 286 u_int odrops; 287#endif 288 time_t ts; /* timestamp on network stats */ 289 } int_data; |
274 char int_passwd[RIP_AUTH_PW_LEN]; /* RIPv2 password */ | 290 struct auth { /* authentication info */ 291 u_char type; 292# define MAX_AUTH_KEYS 3 293 struct auth_key { 294 u_char key[RIP_AUTH_PW_LEN]; 295 u_char keyid; 296 time_t start, end; 297 } keys[MAX_AUTH_KEYS]; 298 } int_auth; |
275 int int_rdisc_pref; /* advertised rdisc preference */ 276 int int_rdisc_int; /* MaxAdvertiseInterval */ 277 int int_rdisc_cnt; 278 struct timeval int_rdisc_timer; 279}; 280 281/* bits in int_state */ 282#define IS_ALIAS 0x0000001 /* interface alias */ 283#define IS_SUBNET 0x0000002 /* interface on subnetted network */ 284#define IS_REMOTE 0x0000004 /* interface is not on this machine */ 285#define IS_PASSIVE 0x0000008 /* remote and does not do RIP */ 286#define IS_EXTERNAL 0x0000010 /* handled by EGP or something */ 287#define IS_CHECKED 0x0000020 /* still exists */ 288#define IS_ALL_HOSTS 0x0000040 /* in INADDR_ALLHOSTS_GROUP */ 289#define IS_ALL_ROUTERS 0x0000080 /* in INADDR_ALLROUTERS_GROUP */ | 299 int int_rdisc_pref; /* advertised rdisc preference */ 300 int int_rdisc_int; /* MaxAdvertiseInterval */ 301 int int_rdisc_cnt; 302 struct timeval int_rdisc_timer; 303}; 304 305/* bits in int_state */ 306#define IS_ALIAS 0x0000001 /* interface alias */ 307#define IS_SUBNET 0x0000002 /* interface on subnetted network */ 308#define IS_REMOTE 0x0000004 /* interface is not on this machine */ 309#define IS_PASSIVE 0x0000008 /* remote and does not do RIP */ 310#define IS_EXTERNAL 0x0000010 /* handled by EGP or something */ 311#define IS_CHECKED 0x0000020 /* still exists */ 312#define IS_ALL_HOSTS 0x0000040 /* in INADDR_ALLHOSTS_GROUP */ 313#define IS_ALL_ROUTERS 0x0000080 /* in INADDR_ALLROUTERS_GROUP */ |
290#define IS_RIP_QUERIED 0x0000100 /* query broadcast */ | 314#define IS_DISTRUST 0x0000100 /* ignore untrusted routers */ |
291#define IS_BROKE 0x0000200 /* seems to be broken */ 292#define IS_SICK 0x0000400 /* seems to be broken */ 293#define IS_DUP 0x0000800 /* has a duplicate address */ | 315#define IS_BROKE 0x0000200 /* seems to be broken */ 316#define IS_SICK 0x0000400 /* seems to be broken */ 317#define IS_DUP 0x0000800 /* has a duplicate address */ |
294#define IS_ACTIVE 0x0001000 /* heard from it at least once */ | 318/* 0x0001000 spare */ |
295#define IS_NEED_NET_SYN 0x0002000 /* need RS_NET_SYN route */ 296#define IS_NO_AG 0x0004000 /* do not aggregate subnets */ 297#define IS_NO_SUPER_AG 0x0008000 /* do not aggregate networks */ 298#define IS_NO_RIPV1_IN 0x0010000 /* no RIPv1 input at all */ 299#define IS_NO_RIPV2_IN 0x0020000 /* no RIPv2 input at all */ 300#define IS_NO_RIP_IN (IS_NO_RIPV1_IN | IS_NO_RIPV2_IN) 301#define IS_RIP_IN_OFF(s) (((s) & IS_NO_RIP_IN) == IS_NO_RIP_IN) 302#define IS_NO_RIPV1_OUT 0x0040000 /* no RIPv1 output at all */ --- 55 unchanged lines hidden (view full) --- 358 AGS_SUPPRESS | AGS_CORS_GATE) 359}; 360 361 362/* parameters for interfaces */ 363extern struct parm { 364 struct parm *parm_next; 365 char parm_name[IFNAMSIZ+1]; | 319#define IS_NEED_NET_SYN 0x0002000 /* need RS_NET_SYN route */ 320#define IS_NO_AG 0x0004000 /* do not aggregate subnets */ 321#define IS_NO_SUPER_AG 0x0008000 /* do not aggregate networks */ 322#define IS_NO_RIPV1_IN 0x0010000 /* no RIPv1 input at all */ 323#define IS_NO_RIPV2_IN 0x0020000 /* no RIPv2 input at all */ 324#define IS_NO_RIP_IN (IS_NO_RIPV1_IN | IS_NO_RIPV2_IN) 325#define IS_RIP_IN_OFF(s) (((s) & IS_NO_RIP_IN) == IS_NO_RIP_IN) 326#define IS_NO_RIPV1_OUT 0x0040000 /* no RIPv1 output at all */ --- 55 unchanged lines hidden (view full) --- 382 AGS_SUPPRESS | AGS_CORS_GATE) 383}; 384 385 386/* parameters for interfaces */ 387extern struct parm { 388 struct parm *parm_next; 389 char parm_name[IFNAMSIZ+1]; |
366 naddr parm_addr_h; | 390 naddr parm_net; |
367 naddr parm_mask; 368 369 char parm_d_metric; 370 u_int parm_int_state; 371 int parm_rdisc_pref; 372 int parm_rdisc_int; | 391 naddr parm_mask; 392 393 char parm_d_metric; 394 u_int parm_int_state; 395 int parm_rdisc_pref; 396 int parm_rdisc_int; |
373 char parm_passwd[RIP_AUTH_PW_LEN+1]; | 397 struct auth parm_auth; |
374} *parms; 375 376/* authority for internal networks */ 377extern struct intnet { 378 struct intnet *intnet_next; 379 naddr intnet_addr; 380 naddr intnet_mask; 381 char intnet_metric; 382} *intnets; 383 | 398} *parms; 399 400/* authority for internal networks */ 401extern struct intnet { 402 struct intnet *intnet_next; 403 naddr intnet_addr; 404 naddr intnet_mask; 405 char intnet_metric; 406} *intnets; 407 |
408/* trusted routers */ 409extern struct tgate { 410 struct tgate *tgate_next; 411 naddr tgate_addr; 412} *tgates; |
|
384 | 413 |
414enum output_type {OUT_QUERY, OUT_UNICAST, OUT_BROADCAST, OUT_MULTICAST, 415 NO_OUT_MULTICAST, NO_OUT_RIPV2}; |
|
385 | 416 |
417/* common output buffers */ 418extern struct ws_buf { 419 struct rip *buf; 420 struct netinfo *n; 421 struct netinfo *base; 422 struct netinfo *lim; 423 enum output_type type; 424} v12buf, v2buf; 425 |
|
386extern pid_t mypid; 387extern naddr myaddr; /* main address of this system */ 388 389extern int stopint; /* !=0 to stop */ 390 391extern int sock_max; 392extern int rip_sock; /* RIP socket */ 393extern struct interface *rip_sock_mcast; /* current multicast interface */ --- 5 unchanged lines hidden (view full) --- 399extern int supplier; /* process should supply updates */ 400extern int lookforinterfaces; /* 1=probe for new up interfaces */ 401extern int supplier_set; /* -s or -q requested */ 402extern int ridhosts; /* 1=reduce host routes */ 403extern int mhome; /* 1=want multi-homed host route */ 404extern int advertise_mhome; /* 1=must continue adverising it */ 405extern int auth_ok; /* 1=ignore auth if we do not care */ 406 | 426extern pid_t mypid; 427extern naddr myaddr; /* main address of this system */ 428 429extern int stopint; /* !=0 to stop */ 430 431extern int sock_max; 432extern int rip_sock; /* RIP socket */ 433extern struct interface *rip_sock_mcast; /* current multicast interface */ --- 5 unchanged lines hidden (view full) --- 439extern int supplier; /* process should supply updates */ 440extern int lookforinterfaces; /* 1=probe for new up interfaces */ 441extern int supplier_set; /* -s or -q requested */ 442extern int ridhosts; /* 1=reduce host routes */ 443extern int mhome; /* 1=want multi-homed host route */ 444extern int advertise_mhome; /* 1=must continue adverising it */ 445extern int auth_ok; /* 1=ignore auth if we do not care */ 446 |
407extern struct timeval epoch; /* when started */ | 447extern struct timeval clk; /* system clock's idea of time */ 448extern struct timeval epoch; /* system clock when started */ |
408extern struct timeval now; /* current idea of time */ 409extern time_t now_stale; 410extern time_t now_expire; 411extern time_t now_garbage; 412 413extern struct timeval next_bcast; /* next general broadcast */ 414extern struct timeval age_timer; /* next check of old routes */ 415extern struct timeval no_flash; /* inhibit flash update until then */ 416extern struct timeval rdisc_timer; /* next advert. or solicitation */ 417extern int rdisc_ok; /* using solicited route */ 418 419extern struct timeval ifinit_timer; /* time to check interfaces */ 420 421extern naddr loopaddr; /* our address on loopback */ 422extern int tot_interfaces; /* # of remote and local interfaces */ 423extern int rip_interfaces; /* # of interfaces doing RIP */ 424extern struct interface *ifnet; /* all interfaces */ | 449extern struct timeval now; /* current idea of time */ 450extern time_t now_stale; 451extern time_t now_expire; 452extern time_t now_garbage; 453 454extern struct timeval next_bcast; /* next general broadcast */ 455extern struct timeval age_timer; /* next check of old routes */ 456extern struct timeval no_flash; /* inhibit flash update until then */ 457extern struct timeval rdisc_timer; /* next advert. or solicitation */ 458extern int rdisc_ok; /* using solicited route */ 459 460extern struct timeval ifinit_timer; /* time to check interfaces */ 461 462extern naddr loopaddr; /* our address on loopback */ 463extern int tot_interfaces; /* # of remote and local interfaces */ 464extern int rip_interfaces; /* # of interfaces doing RIP */ 465extern struct interface *ifnet; /* all interfaces */ |
466extern struct interface *remote_if; /* remote interfaces */ |
|
425extern int have_ripv1_out; /* have a RIPv1 interface */ 426extern int have_ripv1_in; 427extern int need_flash; /* flash update needed */ 428extern struct timeval need_kern; /* need to update kernel table */ 429extern int update_seqno; /* a route has changed */ 430 431extern u_int tracelevel, new_tracelevel; 432#define MAX_TRACELEVEL 4 --- 11 unchanged lines hidden (view full) --- 444#define dup2(x,y) BSDdup2(x,y) 445#endif /* sgi */ 446 447extern void fix_sock(int, char *); 448extern void fix_select(void); 449extern void rip_off(void); 450extern void rip_on(struct interface *); 451 | 467extern int have_ripv1_out; /* have a RIPv1 interface */ 468extern int have_ripv1_in; 469extern int need_flash; /* flash update needed */ 470extern struct timeval need_kern; /* need to update kernel table */ 471extern int update_seqno; /* a route has changed */ 472 473extern u_int tracelevel, new_tracelevel; 474#define MAX_TRACELEVEL 4 --- 11 unchanged lines hidden (view full) --- 486#define dup2(x,y) BSDdup2(x,y) 487#endif /* sgi */ 488 489extern void fix_sock(int, char *); 490extern void fix_select(void); 491extern void rip_off(void); 492extern void rip_on(struct interface *); 493 |
452enum output_type {OUT_QUERY, OUT_UNICAST, OUT_BROADCAST, OUT_MULTICAST, 453 NO_OUT_MULTICAST, NO_OUT_RIPV2}; 454extern int output(enum output_type, struct sockaddr_in *, 455 struct interface *, struct rip *, int); | 494extern void bufinit(void); 495extern int output(enum output_type, struct sockaddr_in *, 496 struct interface *, struct rip *, int); 497extern void clr_ws_buf(struct ws_buf *, struct auth_key *, struct interface *); |
456extern void rip_query(void); 457extern void rip_bcast(int); 458extern void supply(struct sockaddr_in *, struct interface *, | 498extern void rip_query(void); 499extern void rip_bcast(int); 500extern void supply(struct sockaddr_in *, struct interface *, |
459 enum output_type, int, int); | 501 enum output_type, int, int, int); |
460 461extern void msglog(char *, ...); | 502 503extern void msglog(char *, ...); |
504struct msg_limit { 505 naddr addr; 506 time_t until; 507}; 508extern void msglim(struct msg_limit *, naddr, char *, ...); |
|
462#define LOGERR(msg) msglog(msg ": %s", strerror(errno)) 463extern void logbad(int, char *, ...); 464#define BADERR(dump,msg) logbad(dump,msg ": %s", strerror(errno)) 465#ifdef DEBUG 466#define DBGERR(dump,msg) BADERR(dump,msg) 467#else 468#define DBGERR(dump,msg) LOGERR(msg) 469#endif --- 9 unchanged lines hidden (view full) --- 479extern char *parse_parms(char *); 480extern char *check_parms(struct parm *); 481extern void get_parms(struct interface *); 482 483extern void lastlog(void); 484extern void trace_on(char *, int); 485extern void trace_off(char*, ...); 486extern void trace_flush(void); | 509#define LOGERR(msg) msglog(msg ": %s", strerror(errno)) 510extern void logbad(int, char *, ...); 511#define BADERR(dump,msg) logbad(dump,msg ": %s", strerror(errno)) 512#ifdef DEBUG 513#define DBGERR(dump,msg) BADERR(dump,msg) 514#else 515#define DBGERR(dump,msg) LOGERR(msg) 516#endif --- 9 unchanged lines hidden (view full) --- 526extern char *parse_parms(char *); 527extern char *check_parms(struct parm *); 528extern void get_parms(struct interface *); 529 530extern void lastlog(void); 531extern void trace_on(char *, int); 532extern void trace_off(char*, ...); 533extern void trace_flush(void); |
487extern void set_tracelevel(void); | 534extern void set_tracelevel(int); |
488extern void trace_kernel(char *, ...); 489extern void trace_act(char *, ...); 490extern void trace_pkt(char *, ...); 491extern void trace_add_del(char *, struct rt_entry *); 492extern void trace_change(struct rt_entry *, u_int, naddr, naddr, int, 493 u_short, struct interface *, time_t, char *); 494extern void trace_if(char *, struct interface *); 495extern void trace_upslot(struct rt_entry *, struct rt_spare *, --- 52 unchanged lines hidden (view full) --- 548void rt_xaddrs(struct rt_addrinfo *, struct sockaddr *, struct sockaddr *, 549 int); 550 551extern naddr std_mask(naddr); 552extern naddr ripv1_mask_net(naddr, struct interface *); 553extern naddr ripv1_mask_host(naddr,struct interface *); 554#define on_net(a,net,mask) (((ntohl(a) ^ (net)) & (mask)) == 0) 555extern int check_dst(naddr); | 535extern void trace_kernel(char *, ...); 536extern void trace_act(char *, ...); 537extern void trace_pkt(char *, ...); 538extern void trace_add_del(char *, struct rt_entry *); 539extern void trace_change(struct rt_entry *, u_int, naddr, naddr, int, 540 u_short, struct interface *, time_t, char *); 541extern void trace_if(char *, struct interface *); 542extern void trace_upslot(struct rt_entry *, struct rt_spare *, --- 52 unchanged lines hidden (view full) --- 595void rt_xaddrs(struct rt_addrinfo *, struct sockaddr *, struct sockaddr *, 596 int); 597 598extern naddr std_mask(naddr); 599extern naddr ripv1_mask_net(naddr, struct interface *); 600extern naddr ripv1_mask_host(naddr,struct interface *); 601#define on_net(a,net,mask) (((ntohl(a) ^ (net)) & (mask)) == 0) 602extern int check_dst(naddr); |
556extern void addrouteforif(register struct interface *); | 603extern struct interface *check_dup(naddr, naddr, naddr, int); 604extern int check_remote(struct interface *); 605extern int addrouteforif(register struct interface *); |
557extern void ifinit(void); 558extern int walk_bad(struct radix_node *, struct walkarg *); 559extern int if_ok(struct interface *, char *); 560extern void if_sick(struct interface *); 561extern void if_bad(struct interface *); | 606extern void ifinit(void); 607extern int walk_bad(struct radix_node *, struct walkarg *); 608extern int if_ok(struct interface *, char *); 609extern void if_sick(struct interface *); 610extern void if_bad(struct interface *); |
611extern void if_link(struct interface *); |
|
562extern struct interface *ifwithaddr(naddr, int, int); 563extern struct interface *ifwithname(char *, naddr); 564extern struct interface *ifwithindex(u_short); 565extern struct interface *iflookup(naddr); | 612extern struct interface *ifwithaddr(naddr, int, int); 613extern struct interface *ifwithname(char *, naddr); 614extern struct interface *ifwithindex(u_short); 615extern struct interface *iflookup(naddr); |
616 617extern struct auth_key *find_auth(struct interface *); 618extern void end_md5_auth(struct ws_buf *, struct auth_key *); 619 620#include <md5.h> |
|