#include <sys/cdefs.h>
#include "opt_inet.h"
#include "opt_inet6.h"
#include "opt_ipsec.h"
#include "opt_route.h"
#include <sys/param.h>
#include <sys/jail.h>
#include <sys/kernel.h>
#include <sys/eventhandler.h>
#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/mbuf.h>
#include <sys/priv.h>
#include <sys/proc.h>
#include <sys/protosw.h>
#include <sys/rwlock.h>
#include <sys/signalvar.h>
#include <sys/socket.h>
#include <sys/socketvar.h>
#include <sys/sx.h>
#include <sys/sysctl.h>
#include <sys/systm.h>
#include <vm/uma.h>
#include <net/if.h>
#include <net/if_var.h>
#include <net/route.h>
#include <net/route/route_ctl.h>
#include <net/vnet.h>
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/in_fib.h>
#include <netinet/in_pcb.h>
#include <netinet/in_var.h>
#include <netinet/if_ether.h>
#include <netinet/ip.h>
#include <netinet/ip_var.h>
#include <netinet/ip_mroute.h>
#include <netinet/ip_icmp.h>
#include <netipsec/ipsec_support.h>
#include <machine/stdarg.h>
#include <security/mac/mac_framework.h>
Go to the source code of this file.
|
| __FBSDID ("$FreeBSD$") |
|
| VNET_DEFINE (int, ip_defttl) |
|
| SYSCTL_INT (_net_inet_ip, IPCTL_DEFTTL, ttl, CTLFLAG_VNET|CTLFLAG_RW, &VNET_NAME(ip_defttl), 0, "Maximum TTL on IP packets") |
|
| VNET_DEFINE (struct inpcbinfo, ripcbinfo) |
|
| VNET_DEFINE (ip_fw_chk_ptr_t, ip_fw_chk_ptr) |
|
| VNET_DEFINE (ip_fw_ctl_ptr_t, ip_fw_ctl_ptr) |
|
| SYSCTL_ULONG (_net_inet_raw, OID_AUTO, maxdgram, CTLFLAG_RW, &rip_sendspace, 0, "Maximum outgoing raw IP datagram size") |
|
| SYSCTL_ULONG (_net_inet_raw, OID_AUTO, recvspace, CTLFLAG_RW, &rip_recvspace, 0, "Maximum space for incoming raw IP datagrams") |
|
| INPCBSTORAGE_DEFINE (ripcbstor, "rawinp", "ripcb", "rip", "riphash") |
|
static void | rip_init (void *arg __unused) |
|
| VNET_SYSINIT (rip_init, SI_SUB_PROTO_DOMAIN, SI_ORDER_THIRD, rip_init, NULL) |
|
static int | rip_pcblist (SYSCTL_HANDLER_ARGS) |
|
| SYSCTL_PROC (_net_inet_raw, OID_AUTO, pcblist, CTLTYPE_OPAQUE|CTLFLAG_RD|CTLFLAG_MPSAFE, NULL, 0, rip_pcblist, "S,xinpcb", "List of active raw IP sockets") |
|
◆ INP_PCBHASH_RAW
#define INP_PCBHASH_RAW |
( |
|
proto, |
|
|
|
laddr, |
|
|
|
faddr, |
|
|
|
mask |
|
) |
| (((proto) + (laddr) + (faddr)) % (mask) + 1) |
◆ INP_PCBHASH_RAW_SIZE
#define INP_PCBHASH_RAW_SIZE 256 |
◆ V_ripcbinfo
#define V_ripcbinfo VNET(ripcbinfo) |
◆ __FBSDID()
◆ INPCBSTORAGE_DEFINE()
INPCBSTORAGE_DEFINE |
( |
ripcbstor |
, |
|
|
"rawinp" |
, |
|
|
"ripcb" |
, |
|
|
"rip" |
, |
|
|
"riphash" |
|
|
) |
| |
◆ rip_init()
static void rip_init |
( |
void *arg |
__unused | ) |
|
|
static |
◆ rip_pcblist()
static int rip_pcblist |
( |
SYSCTL_HANDLER_ARGS |
| ) |
|
|
static |
◆ SYSCTL_INT()
SYSCTL_INT |
( |
_net_inet_ip |
, |
|
|
IPCTL_DEFTTL |
, |
|
|
ttl |
, |
|
|
CTLFLAG_VNET| |
CTLFLAG_RW, |
|
|
& |
VNET_NAMEip_defttl, |
|
|
0 |
, |
|
|
"Maximum TTL on IP packets" |
|
|
) |
| |
◆ SYSCTL_PROC()
SYSCTL_PROC |
( |
_net_inet_raw |
, |
|
|
OID_AUTO |
, |
|
|
pcblist |
, |
|
|
CTLTYPE_OPAQUE|CTLFLAG_RD| |
CTLFLAG_MPSAFE, |
|
|
NULL |
, |
|
|
0 |
, |
|
|
rip_pcblist |
, |
|
|
" |
S, |
|
|
xinpcb" |
, |
|
|
"List of active raw IP sockets" |
|
|
) |
| |
◆ SYSCTL_ULONG() [1/2]
SYSCTL_ULONG |
( |
_net_inet_raw |
, |
|
|
OID_AUTO |
, |
|
|
maxdgram |
, |
|
|
CTLFLAG_RW |
, |
|
|
& |
rip_sendspace, |
|
|
0 |
, |
|
|
"Maximum outgoing raw IP datagram size" |
|
|
) |
| |
◆ SYSCTL_ULONG() [2/2]
SYSCTL_ULONG |
( |
_net_inet_raw |
, |
|
|
OID_AUTO |
, |
|
|
recvspace |
, |
|
|
CTLFLAG_RW |
, |
|
|
& |
rip_recvspace, |
|
|
0 |
, |
|
|
"Maximum space for incoming raw IP datagrams" |
|
|
) |
| |
◆ VNET_DEFINE() [1/4]
VNET_DEFINE |
( |
int |
, |
|
|
ip_defttl |
|
|
) |
| |
◆ VNET_DEFINE() [2/4]
◆ VNET_DEFINE() [3/4]
◆ VNET_DEFINE() [4/4]
◆ VNET_SYSINIT()
VNET_SYSINIT |
( |
rip_init |
, |
|
|
SI_SUB_PROTO_DOMAIN |
, |
|
|
SI_ORDER_THIRD |
, |
|
|
rip_init |
, |
|
|
NULL |
|
|
) |
| |
◆ inetsw
◆ ip_divert_ptr
void(* ip_divert_ptr) (struct mbuf *, bool) |
( |
struct mbuf * |
m, |
|
|
bool |
incoming |
|
) |
| |
◆ ip_dn_ctl_ptr
int(* ip_dn_ctl_ptr) (struct sockopt *) |
( |
struct sockopt * |
| ) |
|
◆ ip_dn_io_ptr
int(* ip_dn_io_ptr) (struct mbuf **, struct ip_fw_args *) |
( |
struct mbuf ** |
, |
|
|
struct ip_fw_args * |
|
|
) |
| |
◆ ng_ipfw_input_p
int(* ng_ipfw_input_p) (struct mbuf **, struct ip_fw_args *, bool) |
( |
struct mbuf ** |
, |
|
|
struct ip_fw_args * |
, |
|
|
bool |
|
|
) |
| |
◆ rip_recvspace
u_long rip_recvspace = 9216 |
◆ rip_sendspace
u_long rip_sendspace = 9216 |