raw_ip.c (133874) | raw_ip.c (133920) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 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 --- 13 unchanged lines hidden (view full) --- 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)raw_ip.c 8.7 (Berkeley) 5/15/95 | 1/* 2 * Copyright (c) 1982, 1986, 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 --- 13 unchanged lines hidden (view full) --- 22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)raw_ip.c 8.7 (Berkeley) 5/15/95 |
30 * $FreeBSD: head/sys/netinet/raw_ip.c 133874 2004-08-16 18:32:07Z rwatson $ | 30 * $FreeBSD: head/sys/netinet/raw_ip.c 133920 2004-08-17 22:05:54Z andre $ |
31 */ 32 33#include "opt_inet6.h" 34#include "opt_ipsec.h" 35#include "opt_mac.h" 36 37#include <sys/param.h> 38#include <sys/jail.h> --- 34 unchanged lines hidden (view full) --- 73#ifdef IPSEC 74#include <netinet6/ipsec.h> 75#endif /*IPSEC*/ 76 77struct inpcbhead ripcb; 78struct inpcbinfo ripcbinfo; 79 80/* control hooks for ipfw and dummynet */ | 31 */ 32 33#include "opt_inet6.h" 34#include "opt_ipsec.h" 35#include "opt_mac.h" 36 37#include <sys/param.h> 38#include <sys/jail.h> --- 34 unchanged lines hidden (view full) --- 73#ifdef IPSEC 74#include <netinet6/ipsec.h> 75#endif /*IPSEC*/ 76 77struct inpcbhead ripcb; 78struct inpcbinfo ripcbinfo; 79 80/* control hooks for ipfw and dummynet */ |
81ip_fw_ctl_t *ip_fw_ctl_ptr; 82ip_dn_ctl_t *ip_dn_ctl_ptr; | 81ip_fw_ctl_t *ip_fw_ctl_ptr = NULL; 82ip_dn_ctl_t *ip_dn_ctl_ptr = NULL; |
83 84/* 85 * hooks for multicast routing. They all default to NULL, 86 * so leave them not initialized and rely on BSS being set to 0. 87 */ 88 89/* The socket used to communicate with the multicast routing daemon. */ 90struct socket *ip_mrouter; --- 262 unchanged lines hidden (view full) --- 353 optval = inp->inp_flags & INP_HDRINCL; 354 error = sooptcopyout(sopt, &optval, sizeof optval); 355 break; 356 357 case IP_FW_ADD: /* ADD actually returns the body... */ 358 case IP_FW_GET: 359 case IP_FW_TABLE_GETSIZE: 360 case IP_FW_TABLE_LIST: | 83 84/* 85 * hooks for multicast routing. They all default to NULL, 86 * so leave them not initialized and rely on BSS being set to 0. 87 */ 88 89/* The socket used to communicate with the multicast routing daemon. */ 90struct socket *ip_mrouter; --- 262 unchanged lines hidden (view full) --- 353 optval = inp->inp_flags & INP_HDRINCL; 354 error = sooptcopyout(sopt, &optval, sizeof optval); 355 break; 356 357 case IP_FW_ADD: /* ADD actually returns the body... */ 358 case IP_FW_GET: 359 case IP_FW_TABLE_GETSIZE: 360 case IP_FW_TABLE_LIST: |
361 if (IPFW_LOADED) | 361 if (ip_fw_ctl_ptr != NULL) |
362 error = ip_fw_ctl_ptr(sopt); 363 else 364 error = ENOPROTOOPT; 365 break; 366 367 case IP_DUMMYNET_GET: | 362 error = ip_fw_ctl_ptr(sopt); 363 else 364 error = ENOPROTOOPT; 365 break; 366 367 case IP_DUMMYNET_GET: |
368 if (DUMMYNET_LOADED) | 368 if (ip_dn_ctl_ptr != NULL) |
369 error = ip_dn_ctl_ptr(sopt); 370 else 371 error = ENOPROTOOPT; 372 break ; 373 374 case MRT_INIT: 375 case MRT_DONE: 376 case MRT_ADD_VIF: --- 32 unchanged lines hidden (view full) --- 409 case IP_FW_ADD: 410 case IP_FW_DEL: 411 case IP_FW_FLUSH: 412 case IP_FW_ZERO: 413 case IP_FW_RESETLOG: 414 case IP_FW_TABLE_ADD: 415 case IP_FW_TABLE_DEL: 416 case IP_FW_TABLE_FLUSH: | 369 error = ip_dn_ctl_ptr(sopt); 370 else 371 error = ENOPROTOOPT; 372 break ; 373 374 case MRT_INIT: 375 case MRT_DONE: 376 case MRT_ADD_VIF: --- 32 unchanged lines hidden (view full) --- 409 case IP_FW_ADD: 410 case IP_FW_DEL: 411 case IP_FW_FLUSH: 412 case IP_FW_ZERO: 413 case IP_FW_RESETLOG: 414 case IP_FW_TABLE_ADD: 415 case IP_FW_TABLE_DEL: 416 case IP_FW_TABLE_FLUSH: |
417 if (IPFW_LOADED) | 417 if (ip_fw_ctl_ptr != NULL) |
418 error = ip_fw_ctl_ptr(sopt); 419 else 420 error = ENOPROTOOPT; 421 break; 422 423 case IP_DUMMYNET_CONFIGURE: 424 case IP_DUMMYNET_DEL: 425 case IP_DUMMYNET_FLUSH: | 418 error = ip_fw_ctl_ptr(sopt); 419 else 420 error = ENOPROTOOPT; 421 break; 422 423 case IP_DUMMYNET_CONFIGURE: 424 case IP_DUMMYNET_DEL: 425 case IP_DUMMYNET_FLUSH: |
426 if (DUMMYNET_LOADED) | 426 if (ip_dn_ctl_ptr != NULL) |
427 error = ip_dn_ctl_ptr(sopt); 428 else 429 error = ENOPROTOOPT ; 430 break ; 431 432 case IP_RSVP_ON: 433 error = ip_rsvp_init(so); 434 break; --- 441 unchanged lines hidden --- | 427 error = ip_dn_ctl_ptr(sopt); 428 else 429 error = ENOPROTOOPT ; 430 break ; 431 432 case IP_RSVP_ON: 433 error = ip_rsvp_init(so); 434 break; --- 441 unchanged lines hidden --- |