Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/raw_ip.c
Show First 20 Lines • Show All 127 Lines • ▼ Show 20 Lines | |||||
int (*legal_vif_num)(int); | int (*legal_vif_num)(int); | ||||
u_long (*ip_mcast_src)(int); | u_long (*ip_mcast_src)(int); | ||||
int (*rsvp_input_p)(struct mbuf **, int *, int); | int (*rsvp_input_p)(struct mbuf **, int *, int); | ||||
int (*ip_rsvp_vif)(struct socket *, struct sockopt *); | int (*ip_rsvp_vif)(struct socket *, struct sockopt *); | ||||
void (*ip_rsvp_force_done)(struct socket *); | void (*ip_rsvp_force_done)(struct socket *); | ||||
#endif /* INET */ | #endif /* INET */ | ||||
extern struct protosw inetsw[]; | |||||
u_long rip_sendspace = 9216; | u_long rip_sendspace = 9216; | ||||
SYSCTL_ULONG(_net_inet_raw, OID_AUTO, maxdgram, CTLFLAG_RW, | SYSCTL_ULONG(_net_inet_raw, OID_AUTO, maxdgram, CTLFLAG_RW, | ||||
&rip_sendspace, 0, "Maximum outgoing raw IP datagram size"); | &rip_sendspace, 0, "Maximum outgoing raw IP datagram size"); | ||||
u_long rip_recvspace = 9216; | u_long rip_recvspace = 9216; | ||||
SYSCTL_ULONG(_net_inet_raw, OID_AUTO, recvspace, CTLFLAG_RW, | SYSCTL_ULONG(_net_inet_raw, OID_AUTO, recvspace, CTLFLAG_RW, | ||||
&rip_recvspace, 0, "Maximum space for incoming raw IP datagrams"); | &rip_recvspace, 0, "Maximum space for incoming raw IP datagrams"); | ||||
▲ Show 20 Lines • Show All 919 Lines • ▼ Show 20 Lines | |||||
} | } | ||||
SYSCTL_PROC(_net_inet_raw, OID_AUTO/*XXX*/, pcblist, | SYSCTL_PROC(_net_inet_raw, OID_AUTO/*XXX*/, pcblist, | ||||
CTLTYPE_OPAQUE | CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, 0, | CTLTYPE_OPAQUE | CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, 0, | ||||
rip_pcblist, "S,xinpcb", | rip_pcblist, "S,xinpcb", | ||||
"List of active raw IP sockets"); | "List of active raw IP sockets"); | ||||
#ifdef INET | #ifdef INET | ||||
struct pr_usrreqs rip_usrreqs = { | /* | ||||
.pru_abort = rip_abort, | * See comment in in_proto.c containing "protosw definitions are not needed". | ||||
.pru_attach = rip_attach, | */ | ||||
.pru_bind = rip_bind, | #define RAW_PROTOSW \ | ||||
.pru_connect = rip_connect, | .pr_type = SOCK_RAW, \ | ||||
.pru_control = in_control, | .pr_flags = PR_ATOMIC|PR_ADDR, \ | ||||
.pru_detach = rip_detach, | .pr_ctloutput = rip_ctloutput, \ | ||||
.pru_disconnect = rip_disconnect, | .pr_abort = rip_abort, \ | ||||
.pru_peeraddr = in_getpeeraddr, | .pr_attach = rip_attach, \ | ||||
.pru_send = rip_send, | .pr_bind = rip_bind, \ | ||||
.pru_shutdown = rip_shutdown, | .pr_connect = rip_connect, \ | ||||
.pru_sockaddr = in_getsockaddr, | .pr_control = in_control, \ | ||||
.pru_sosetlabel = in_pcbsosetlabel, | .pr_detach = rip_detach, \ | ||||
.pru_close = rip_close, | .pr_disconnect = rip_disconnect, \ | ||||
.pr_peeraddr = in_getpeeraddr, \ | |||||
.pr_send = rip_send, \ | |||||
.pr_shutdown = rip_shutdown, \ | |||||
.pr_sockaddr = in_getsockaddr, \ | |||||
.pr_sosetlabel = in_pcbsosetlabel, \ | |||||
.pr_close = rip_close | |||||
struct protosw rip_protosw = { | |||||
.pr_protocol = IPPROTO_RAW, | |||||
RAW_PROTOSW | |||||
}; | |||||
struct protosw icmp_protosw = { | |||||
.pr_protocol = IPPROTO_ICMP, | |||||
RAW_PROTOSW | |||||
}; | |||||
struct protosw igmp_protosw = { | |||||
.pr_protocol = IPPROTO_IGMP, | |||||
RAW_PROTOSW | |||||
}; | |||||
struct protosw rsvp_protosw = { | |||||
.pr_protocol = IPPROTO_RSVP, | |||||
RAW_PROTOSW | |||||
}; | |||||
struct protosw rawipv4_protosw = { | |||||
.pr_protocol = IPPROTO_IPV4, | |||||
RAW_PROTOSW | |||||
}; | |||||
struct protosw mobile_protosw = { | |||||
.pr_protocol = IPPROTO_MOBILE, | |||||
RAW_PROTOSW | |||||
}; | |||||
struct protosw etherip_protosw = { | |||||
.pr_protocol = IPPROTO_ETHERIP, | |||||
RAW_PROTOSW | |||||
}; | |||||
struct protosw gre_protosw = { | |||||
.pr_protocol = IPPROTO_GRE, | |||||
RAW_PROTOSW | |||||
}; | |||||
#ifdef INET6 | |||||
struct protosw rawipv6_protosw = { | |||||
.pr_protocol = IPPROTO_IPV6, | |||||
RAW_PROTOSW | |||||
}; | |||||
#endif | |||||
struct protosw pim_protosw = { | |||||
.pr_protocol = IPPROTO_PIM, | |||||
RAW_PROTOSW | |||||
}; | |||||
struct protosw ripwild_protosw = { | |||||
RAW_PROTOSW | |||||
}; | }; | ||||
#endif /* INET */ | #endif /* INET */ |