Changeset View
Changeset View
Standalone View
Standalone View
sys/netinet/udp_var.h
Show First 20 Lines • Show All 130 Lines • ▼ Show 20 Lines | |||||
#define UDPCTL_RECVSPACE 4 /* default receive buffer space */ | #define UDPCTL_RECVSPACE 4 /* default receive buffer space */ | ||||
#define UDPCTL_PCBLIST 5 /* list of PCBs for UDP sockets */ | #define UDPCTL_PCBLIST 5 /* list of PCBs for UDP sockets */ | ||||
#ifdef _KERNEL | #ifdef _KERNEL | ||||
#include <netinet/in_pcb.h> | #include <netinet/in_pcb.h> | ||||
SYSCTL_DECL(_net_inet_udp); | SYSCTL_DECL(_net_inet_udp); | ||||
extern struct pr_usrreqs udp_usrreqs; | extern struct pr_usrreqs udp_usrreqs; | ||||
VNET_DECLARE(struct inpcbhead, udb); | |||||
VNET_DECLARE(struct inpcbinfo, udbinfo); | VNET_DECLARE(struct inpcbinfo, udbinfo); | ||||
VNET_DECLARE(struct inpcbhead, ulitecb); | |||||
VNET_DECLARE(struct inpcbinfo, ulitecbinfo); | VNET_DECLARE(struct inpcbinfo, ulitecbinfo); | ||||
#define V_udb VNET(udb) | |||||
#define V_udbinfo VNET(udbinfo) | #define V_udbinfo VNET(udbinfo) | ||||
#define V_ulitecb VNET(ulitecb) | |||||
#define V_ulitecbinfo VNET(ulitecbinfo) | #define V_ulitecbinfo VNET(ulitecbinfo) | ||||
extern u_long udp_sendspace; | extern u_long udp_sendspace; | ||||
extern u_long udp_recvspace; | extern u_long udp_recvspace; | ||||
VNET_DECLARE(int, udp_cksum); | VNET_DECLARE(int, udp_cksum); | ||||
VNET_DECLARE(int, udp_blackhole); | VNET_DECLARE(int, udp_blackhole); | ||||
VNET_DECLARE(bool, udp_blackhole_local); | VNET_DECLARE(bool, udp_blackhole_local); | ||||
VNET_DECLARE(int, udp_log_in_vain); | VNET_DECLARE(int, udp_log_in_vain); | ||||
#define V_udp_cksum VNET(udp_cksum) | #define V_udp_cksum VNET(udp_cksum) | ||||
#define V_udp_blackhole VNET(udp_blackhole) | #define V_udp_blackhole VNET(udp_blackhole) | ||||
#define V_udp_blackhole_local VNET(udp_blackhole_local) | #define V_udp_blackhole_local VNET(udp_blackhole_local) | ||||
#define V_udp_log_in_vain VNET(udp_log_in_vain) | #define V_udp_log_in_vain VNET(udp_log_in_vain) | ||||
VNET_DECLARE(int, zero_checksum_port); | VNET_DECLARE(int, zero_checksum_port); | ||||
#define V_zero_checksum_port VNET(zero_checksum_port) | #define V_zero_checksum_port VNET(zero_checksum_port) | ||||
static __inline struct inpcbinfo * | static __inline struct inpcbinfo * | ||||
udp_get_inpcbinfo(int protocol) | udp_get_inpcbinfo(int protocol) | ||||
{ | { | ||||
return (protocol == IPPROTO_UDP) ? &V_udbinfo : &V_ulitecbinfo; | return (protocol == IPPROTO_UDP) ? &V_udbinfo : &V_ulitecbinfo; | ||||
} | |||||
static __inline struct inpcbhead * | |||||
udp_get_pcblist(int protocol) | |||||
{ | |||||
return (protocol == IPPROTO_UDP) ? &V_udb : &V_ulitecb; | |||||
} | } | ||||
int udp_newudpcb(struct inpcb *); | int udp_newudpcb(struct inpcb *); | ||||
void udp_discardcb(struct udpcb *); | void udp_discardcb(struct udpcb *); | ||||
void udp_ctlinput(int, struct sockaddr *, void *); | void udp_ctlinput(int, struct sockaddr *, void *); | ||||
void udplite_ctlinput(int, struct sockaddr *, void *); | void udplite_ctlinput(int, struct sockaddr *, void *); | ||||
int udp_ctloutput(struct socket *, struct sockopt *); | int udp_ctloutput(struct socket *, struct sockopt *); | ||||
Show All 13 Lines |