FreeBSD kernel IPv4 code
|
#include <sys/cdefs.h>
#include <netinet/sctp_os.h>
#include <netinet/sctp.h>
#include <netinet/sctp_constants.h>
#include <netinet/sctp_sysctl.h>
#include <netinet/sctp_pcb.h>
#include <netinet/sctputil.h>
#include <netinet/sctp_output.h>
#include <sys/smp.h>
#include <sys/sysctl.h>
Go to the source code of this file.
Macros | |
#define | SCTP_UINT_SYSCTL(mib_name, var_name, prefix) |
Functions | |
__FBSDID ("$FreeBSD$") | |
FEATURE (sctp, "Stream Control Transmission Protocol") | |
void | sctp_init_sysctls () |
static unsigned int | sctp_sysctl_number_of_addresses (struct sctp_inpcb *inp) |
static int | sctp_sysctl_copy_out_local_addresses (struct sctp_inpcb *inp, struct sctp_tcb *stcb, struct sysctl_req *req) |
static int | sctp_sysctl_handle_assoclist (SYSCTL_HANDLER_ARGS) |
static int | sctp_sysctl_handle_udp_tunneling (SYSCTL_HANDLER_ARGS) |
static int | sctp_sysctl_handle_auth (SYSCTL_HANDLER_ARGS) |
static int | sctp_sysctl_handle_asconf (SYSCTL_HANDLER_ARGS) |
static int | sctp_sysctl_handle_stats (SYSCTL_HANDLER_ARGS) |
SYSCTL_PROC (_net_inet_sctp, OID_AUTO, auth_enable, CTLFLAG_VNET|CTLTYPE_UINT|CTLFLAG_RW|CTLFLAG_NEEDGIANT, NULL, 0, sctp_sysctl_handle_auth, "IU", SCTPCTL_AUTH_ENABLE_DESC) | |
SYSCTL_PROC (_net_inet_sctp, OID_AUTO, asconf_enable, CTLFLAG_VNET|CTLTYPE_UINT|CTLFLAG_RW|CTLFLAG_NEEDGIANT, NULL, 0, sctp_sysctl_handle_asconf, "IU", SCTPCTL_ASCONF_ENABLE_DESC) | |
SYSCTL_PROC (_net_inet_sctp, OID_AUTO, udp_tunneling_port, CTLFLAG_VNET|CTLTYPE_UINT|CTLFLAG_RW|CTLFLAG_NEEDGIANT, NULL, 0, sctp_sysctl_handle_udp_tunneling, "IU", SCTPCTL_UDP_TUNNELING_PORT_DESC) | |
SYSCTL_PROC (_net_inet_sctp, OID_AUTO, stats, CTLFLAG_VNET|CTLTYPE_STRUCT|CTLFLAG_RW|CTLFLAG_NEEDGIANT, NULL, 0, sctp_sysctl_handle_stats, "S,sctpstat", "SCTP statistics (struct sctp_stat)") | |
SYSCTL_PROC (_net_inet_sctp, OID_AUTO, assoclist, CTLFLAG_VNET|CTLTYPE_OPAQUE|CTLFLAG_RD|CTLFLAG_NEEDGIANT, NULL, 0, sctp_sysctl_handle_assoclist, "S,xassoc", "List of active SCTP associations") | |
#define SCTP_UINT_SYSCTL | ( | mib_name, | |
var_name, | |||
prefix | |||
) |
Definition at line 838 of file sctp_sysctl.c.
__FBSDID | ( | "$FreeBSD$" | ) |
FEATURE | ( | sctp | , |
"Stream Control Transmission Protocol" | |||
) |
void sctp_init_sysctls | ( | void | ) |
Definition at line 55 of file sctp_sysctl.c.
References SCTP_BASE_SYSCTL, SCTPCTL_ABC_L_VAR_DEFAULT, SCTPCTL_ABORT_AT_LIMIT_DEFAULT, SCTPCTL_ADD_MORE_ON_OUTPUT_DEFAULT, SCTPCTL_ASCONF_ENABLE_DEFAULT, SCTPCTL_ASOC_RESOURCE_DEFAULT, SCTPCTL_ASSOC_RTX_MAX_DEFAULT, SCTPCTL_AUTH_ENABLE_DEFAULT, SCTPCTL_AUTOASCONF_DEFAULT, SCTPCTL_BLACKHOLE_DEFAULT, SCTPCTL_BUFFER_SPLITTING_DEFAULT, SCTPCTL_CHUNKSCALE_DEFAULT, SCTPCTL_CMT_ON_OFF_DEFAULT, SCTPCTL_CMT_USE_DAC_DEFAULT, SCTPCTL_CWND_MAXBURST_DEFAULT, SCTPCTL_DEFAULT_CC_MODULE_DEFAULT, SCTPCTL_DEFAULT_FRAG_INTERLEAVE_DEFAULT, SCTPCTL_DEFAULT_SS_MODULE_DEFAULT, SCTPCTL_DELAYED_SACK_TIME_DEFAULT, SCTPCTL_DIAG_INFO_CODE_DEFAULT, SCTPCTL_DO_SCTP_DRAIN_DEFAULT, SCTPCTL_ECN_ENABLE_DEFAULT, SCTPCTL_FRMAXBURST_DEFAULT, SCTPCTL_HB_MAX_BURST_DEFAULT, SCTPCTL_HEARTBEAT_INTERVAL_DEFAULT, SCTPCTL_INCOMING_STREAMS_DEFAULT, SCTPCTL_INIT_RTO_MAX_DEFAULT, SCTPCTL_INIT_RTX_MAX_DEFAULT, SCTPCTL_INITIAL_CWND_DEFAULT, SCTPCTL_LOGGING_LEVEL_DEFAULT, SCTPCTL_MAX_CHAINED_MBUFS_DEFAULT, SCTPCTL_MAX_RETRAN_CHUNK_DEFAULT, SCTPCTL_MAXBURST_DEFAULT, SCTPCTL_MAXCHUNKS_DEFAULT, SCTPCTL_MAXDGRAM_DEFAULT, SCTPCTL_MIN_RESIDUAL_DEFAULT, SCTPCTL_MIN_SPLIT_POINT_DEFAULT, SCTPCTL_MOBILITY_BASE_DEFAULT, SCTPCTL_MOBILITY_FASTHANDOFF_DEFAULT, SCTPCTL_MULTIPLEASCONFS_DEFAULT, SCTPCTL_NAT_FRIENDLY_DEFAULT, SCTPCTL_NAT_FRIENDLY_INITS_DEFAULT, SCTPCTL_NRSACK_ENABLE_DEFAULT, SCTPCTL_OUTGOING_STREAMS_DEFAULT, SCTPCTL_PATH_PF_THRESHOLD_DEFAULT, SCTPCTL_PATH_RTX_MAX_DEFAULT, SCTPCTL_PCBHASHSIZE_DEFAULT, SCTPCTL_PEER_CHKOH_DEFAULT, SCTPCTL_PKTDROP_ENABLE_DEFAULT, SCTPCTL_PMTU_RAISE_TIME_DEFAULT, SCTPCTL_PR_ENABLE_DEFAULT, SCTPCTL_RECONFIG_ENABLE_DEFAULT, SCTPCTL_RECVSPACE_DEFAULT, SCTPCTL_RTO_INITIAL_DEFAULT, SCTPCTL_RTO_MAX_DEFAULT, SCTPCTL_RTO_MIN_DEFAULT, SCTPCTL_RTTVAR_BW_DEFAULT, SCTPCTL_RTTVAR_DCCCECN_DEFAULT, SCTPCTL_RTTVAR_EQRET_DEFAULT, SCTPCTL_RTTVAR_RTT_DEFAULT, SCTPCTL_RTTVAR_STEADYS_DEFAULT, SCTPCTL_SACK_FREQ_DEFAULT, SCTPCTL_SACK_IMMEDIATELY_ENABLE_DEFAULT, SCTPCTL_SECRET_LIFETIME_DEFAULT, SCTPCTL_SENDALL_LIMIT_DEFAULT, SCTPCTL_SHUTDOWN_GUARD_TIME_DEFAULT, SCTPCTL_SYS_RESOURCE_DEFAULT, SCTPCTL_TCBHASHSIZE_DEFAULT, SCTPCTL_TIME_WAIT_DEFAULT, SCTPCTL_UDP_TUNNELING_PORT_DEFAULT, and SCTPCTL_VALID_COOKIE_LIFE_DEFAULT.
Referenced by sctp_init().
|
static |
Definition at line 187 of file sctp_sysctl.c.
References sctp_ifa::address, sctp_tcb::asoc, sctp_inpcb::def_vrf_id, sctp_laddr::ifa, sctp_ifn::ifalist, sctp_vrf::ifnlist, IN4_ISPRIVATE_ADDRESS, sctp_inpcb::inp, inpcb::inp_cred, sctp_inpcb::ip_inp, sctp_scoping::ipv4_addr_legal, sctp_scoping::ipv4_local_scope, sctp_scoping::ipv6_addr_legal, xsctp_laddr::last, sctp_scoping::local_scope, sctp_scoping::loopback_scope, prison_check_ip4(), in_addr::s_addr, sctp_sockstore::sa, sctp_association::scope, sctp_inpcb::sctp_addr_list, sctp_find_vrf(), sctp_inpcb::sctp_flags, SCTP_IFN_IS_IFT_LOOP, SCTP_INP_INFO_RLOCK, SCTP_INP_INFO_RUNLOCK, SCTP_INP_RLOCK, SCTP_INP_RUNLOCK, SCTP_IPV6_V6ONLY, sctp_is_addr_restricted(), SCTP_PCB_FLAGS_BOUND_V6, SCTP_PCB_FLAGS_BOUNDALL, sctp_sockstore::sin, sctp_sockstore::sin6, sockaddr_in::sin_addr, sctp_scoping::site_scope, and sctp_laddr::start_time.
Referenced by sctp_sysctl_handle_assoclist().
|
static |
Definition at line 626 of file sctp_sysctl.c.
References SCTP_BASE_SYSCTL, SCTPCTL_ASCONF_ENABLE_MAX, and SCTPCTL_ASCONF_ENABLE_MIN.
|
static |
Definition at line 344 of file sctp_sysctl.c.
References sctp_net_route::_l_addr, xsctp_raddr::active, xsctp_raddr::address, sctp_tcb::asoc, xsctp_tcb::assoc_id, xsctp_raddr::confirmed, sctp_association::cumulative_tsn, xsctp_tcb::cumulative_tsn, xsctp_tcb::cumulative_tsn_ack, sctp_nets::cwnd, xsctp_raddr::cwnd, sctp_nets::dest_state, sctp_association::discontinuity_time, xsctp_tcb::discontinuity_time, xsctp_raddr::encaps_port, sctp_nets::error_count, xsctp_raddr::error_counter, sctp_nets::failure_threshold, xsctp_inpcb::features, xsctp_inpcb::flags, sctp_nets::flight_size, xsctp_raddr::flight_size, xsctp_inpcb::fragmentation_point, sctp_nets::heart_beat_delay, sctp_association::heart_beat_delay, xsctp_raddr::heartbeat_enabled, xsctp_tcb::heartbeat_interval, xsctp_raddr::heartbeat_interval, xsctp_tcb::highest_tsn, xsctp_tcb::in_streams, sctp_association::init_seq_number, xsctp_tcb::initial_tsn, sctp_inpcb::inp, xsctp_inpcb::last, xsctp_tcb::last, xsctp_raddr::last, sctp_association::last_acked_seq, xsctp_inpcb::local_port, xsctp_tcb::local_port, xsctp_tcb::local_tag, sctp_nets::marked_retrans, sctp_association::marked_retrans, xsctp_tcb::max_nr_retrans, xsctp_raddr::max_path_rtx, xsctp_inpcb::maxqlen, xsctp_inpcb::maxqlen_old, sctp_nets::mtu, xsctp_tcb::mtu, xsctp_raddr::mtu, sctp_association::my_vtag, sctp_association::nets, xsctp_tcb::out_streams, sctp_association::overall_error_count, sctp_association::peer_vtag, sctp_association::peers_rwnd, xsctp_tcb::peers_rwnd, sctp_nets::port, xsctp_raddr::potentially_failed, xsctp_tcb::primary_addr, sctp_association::primary_destination, xsctp_tcb::primary_process, xsctp_inpcb::qlen, xsctp_inpcb::qlen_old, sctp_association::refcnt, xsctp_tcb::refcnt, xsctp_tcb::remote_port, xsctp_tcb::remote_tag, xsctp_tcb::retransmitted_tsns, sctp_nets::ro, sctp_tcb::rport, sctp_nets::RTO, xsctp_raddr::rto, sctp_nets::rtt, xsctp_raddr::rtt, xsctp_raddr::rtx, SCTP_ACTIVE, SCTP_ADDR_NOHB, SCTP_ADDR_PF, SCTP_ADDR_REACHABLE, SCTP_ADDR_UNCONFIRMED, sctp_inpcb::sctp_asoc_list, SCTP_BASE_INFO, sctp_inpcb::sctp_features, sctp_inpcb::sctp_flags, sctp_inpcb::sctp_frag_point, SCTP_FROM_SCTP_SYSCTL, sctp_get_associd, SCTP_INACTIVE, SCTP_INP_DECR_REF, SCTP_INP_INCR_REF, SCTP_INP_INFO_RLOCK, SCTP_INP_INFO_RUNLOCK, SCTP_INP_RLOCK, SCTP_INP_RUNLOCK, SCTP_IS_LISTENING, SCTP_LTRACE_ERR_RET, sctp_map_assoc_state(), SCTP_PCB_FLAGS_SOCKET_ALLGONE, SCTP_PCB_FLAGS_SOCKET_GONE, sctp_inpcb::sctp_socket, sctp_sysctl_copy_out_local_addresses(), sctp_sysctl_number_of_addresses(), SCTP_TCB_LOCK, SCTP_TCB_UNLOCK, SCTP_UNCONFIRMED, sctp_association::sending_seq, sctp_association::smallest_mtu, xsctp_inpcb::socket, sctp_nets::ssthresh, xsctp_raddr::ssthresh, sctp_nets::start_time, sctp_association::start_time, xsctp_tcb::start_time, xsctp_raddr::start_time, sctp_association::state, xsctp_tcb::state, xsctp_raddr::state, sctp_association::streamincnt, sctp_association::streamoutcnt, xsctp_tcb::T1_expireries, xsctp_tcb::T2_expireries, sctp_association::timocookie, sctp_association::timoinit, sctp_association::timoshutdown, sctp_association::timoshutdownack, sctp_inpcb::total_nospaces, xsctp_inpcb::total_nospaces, sctp_inpcb::total_recvs, sctp_tcb::total_recvs, xsctp_inpcb::total_recvs, xsctp_tcb::total_recvs, sctp_inpcb::total_sends, sctp_tcb::total_sends, xsctp_inpcb::total_sends, xsctp_tcb::total_sends, sctp_timeval::tv_sec, and sctp_timeval::tv_usec.
|
static |
Definition at line 600 of file sctp_sysctl.c.
References SCTP_BASE_SYSCTL, SCTPCTL_AUTH_ENABLE_MAX, and SCTPCTL_AUTH_ENABLE_MIN.
|
static |
Definition at line 652 of file sctp_sysctl.c.
References SCTP_BASE_STATS, sctpstat::sctps_aborted, sctpstat::sctps_activeestab, sctpstat::sctps_badsid, sctpstat::sctps_badsum, sctpstat::sctps_badvtag, sctpstat::sctps_cached_chk, sctpstat::sctps_cached_strmoq, sctpstat::sctps_checksumerrors, sctpstat::sctps_cmt_randry, sctpstat::sctps_collisionestab, sctpstat::sctps_currestab, sctpstat::sctps_datadropchklmt, sctpstat::sctps_datadroprwnd, sctpstat::sctps_discontinuitytime, sctpstat::sctps_ecnereducedcwnd, sctpstat::sctps_fastretransinrtt, sctpstat::sctps_fragusrmsgs, sctpstat::sctps_fwdtsn_map_over, sctpstat::sctps_hdrops, sctpstat::sctps_ifnomemqueued, sctpstat::sctps_incontrolchunks, sctpstat::sctps_inorderchunks, sctpstat::sctps_inpackets, sctpstat::sctps_inunorderchunks, sctpstat::sctps_left_abandon, sctpstat::sctps_lowlevelerr, sctpstat::sctps_lowlevelerrusr, sctpstat::sctps_markedretrans, sctpstat::sctps_maxburstqueued, sctpstat::sctps_naglequeued, sctpstat::sctps_naglesent, sctpstat::sctps_nomem, sctpstat::sctps_noport, sctpstat::sctps_outcontrolchunks, sctpstat::sctps_outoftheblue, sctpstat::sctps_outorderchunks, sctpstat::sctps_outpackets, sctpstat::sctps_outunorderchunks, sctpstat::sctps_passiveestab, sctpstat::sctps_pdrpbadd, sctpstat::sctps_pdrpbwrpt, sctpstat::sctps_pdrpcrupt, sctpstat::sctps_pdrpdiwnp, sctpstat::sctps_pdrpdizrw, sctpstat::sctps_pdrpdnfnd, sctpstat::sctps_pdrpfehos, sctpstat::sctps_pdrpfmbox, sctpstat::sctps_pdrpmark, sctpstat::sctps_pdrpmbct, sctpstat::sctps_pdrpmbda, sctpstat::sctps_pdrpnedat, sctpstat::sctps_pdrppdbrk, sctpstat::sctps_pdrptsnnf, sctpstat::sctps_primary_randry, sctpstat::sctps_protocol_drain_calls, sctpstat::sctps_protocol_drains_done, sctpstat::sctps_read_peeks, sctpstat::sctps_reasmusrmsgs, sctpstat::sctps_recvauth, sctpstat::sctps_recvauthfailed, sctpstat::sctps_recvauthmissing, sctpstat::sctps_recvdata, sctpstat::sctps_recvdatagrams, sctpstat::sctps_recvdupdata, sctpstat::sctps_recvecne, sctpstat::sctps_recvexpress, sctpstat::sctps_recvexpressm, sctpstat::sctps_recvheartbeat, sctpstat::sctps_recvheartbeatack, sctpstat::sctps_recvhwcrc, sctpstat::sctps_recvivalhmacid, sctpstat::sctps_recvivalkeyid, sctpstat::sctps_recvpackets, sctpstat::sctps_recvpktwithdata, sctpstat::sctps_recvsacks, sctpstat::sctps_recvswcrc, sctpstat::sctps_restartestab, sctpstat::sctps_send_burst_avoid, sctpstat::sctps_send_cwnd_avoid, sctpstat::sctps_sendauth, sctpstat::sctps_senddata, sctpstat::sctps_sendecne, sctpstat::sctps_senderrors, sctpstat::sctps_sendfastretrans, sctpstat::sctps_sendheartbeat, sctpstat::sctps_sendhwcrc, sctpstat::sctps_sendmultfastretrans, sctpstat::sctps_sendpackets, sctpstat::sctps_sendretransdata, sctpstat::sctps_sends_with_abort, sctpstat::sctps_sends_with_eof, sctpstat::sctps_sends_with_flags, sctpstat::sctps_sends_with_unord, sctpstat::sctps_sendsacks, sctpstat::sctps_sendswcrc, sctpstat::sctps_shutdown, sctpstat::sctps_slowpath_sack, sctpstat::sctps_timoasconf, sctpstat::sctps_timoassockill, sctpstat::sctps_timoautoclose, sctpstat::sctps_timocookie, sctpstat::sctps_timodata, sctpstat::sctps_timodelprim, sctpstat::sctps_timoearlyfr, sctpstat::sctps_timoheartbeat, sctpstat::sctps_timoinit, sctpstat::sctps_timoinpkill, sctpstat::sctps_timoiterator, sctpstat::sctps_timopathmtu, sctpstat::sctps_timosack, sctpstat::sctps_timosecret, sctpstat::sctps_timoshutdown, sctpstat::sctps_timoshutdownack, sctpstat::sctps_timoshutdownguard, sctpstat::sctps_timostrmrst, sctpstat::sctps_timowindowprobe, sctpstat::sctps_vtagbogus, sctpstat::sctps_vtagexpress, sctpstat::sctps_windowprobed, sctpstat::sctps_wu_sacks_sent, sctp_timeval::tv_sec, and sctp_timeval::tv_usec.
|
static |
Definition at line 565 of file sctp_sysctl.c.
References SCTP_BASE_SYSCTL, SCTP_INP_INFO_RLOCK, SCTP_INP_INFO_RUNLOCK, SCTP_INP_INFO_WLOCK, SCTP_INP_INFO_WUNLOCK, sctp_over_udp_start(), sctp_over_udp_stop(), SCTPCTL_UDP_TUNNELING_PORT_MAX, and SCTPCTL_UDP_TUNNELING_PORT_MIN.
|
static |
Definition at line 137 of file sctp_sysctl.c.
References sctp_ifa::address, sctp_inpcb::def_vrf_id, sctp_laddr::ifa, sctp_ifn::ifalist, sctp_vrf::ifnlist, sctp_sockstore::sa, sctp_inpcb::sctp_addr_list, sctp_find_vrf(), sctp_inpcb::sctp_flags, and SCTP_PCB_FLAGS_BOUNDALL.
Referenced by sctp_sysctl_handle_assoclist().
SYSCTL_PROC | ( | _net_inet_sctp | , |
OID_AUTO | , | ||
asconf_enable | , | ||
CTLFLAG_VNET|CTLTYPE_UINT|CTLFLAG_RW| | CTLFLAG_NEEDGIANT, | ||
NULL | , | ||
0 | , | ||
sctp_sysctl_handle_asconf | , | ||
"IU" | , | ||
SCTPCTL_ASCONF_ENABLE_DESC | |||
) |
SYSCTL_PROC | ( | _net_inet_sctp | , |
OID_AUTO | , | ||
assoclist | , | ||
CTLFLAG_VNET|CTLTYPE_OPAQUE|CTLFLAG_RD| | CTLFLAG_NEEDGIANT, | ||
NULL | , | ||
0 | , | ||
sctp_sysctl_handle_assoclist | , | ||
" | S, | ||
xassoc" | , | ||
"List of active SCTP associations" | |||
) |
SYSCTL_PROC | ( | _net_inet_sctp | , |
OID_AUTO | , | ||
auth_enable | , | ||
CTLFLAG_VNET|CTLTYPE_UINT|CTLFLAG_RW| | CTLFLAG_NEEDGIANT, | ||
NULL | , | ||
0 | , | ||
sctp_sysctl_handle_auth | , | ||
"IU" | , | ||
SCTPCTL_AUTH_ENABLE_DESC | |||
) |
SYSCTL_PROC | ( | _net_inet_sctp | , |
OID_AUTO | , | ||
stats | , | ||
CTLFLAG_VNET|CTLTYPE_STRUCT|CTLFLAG_RW| | CTLFLAG_NEEDGIANT, | ||
NULL | , | ||
0 | , | ||
sctp_sysctl_handle_stats | , | ||
" | S, | ||
sctpstat" | , | ||
"SCTP statistics (struct sctp_stat)" | |||
) |
SYSCTL_PROC | ( | _net_inet_sctp | , |
OID_AUTO | , | ||
udp_tunneling_port | , | ||
CTLFLAG_VNET|CTLTYPE_UINT|CTLFLAG_RW| | CTLFLAG_NEEDGIANT, | ||
NULL | , | ||
0 | , | ||
sctp_sysctl_handle_udp_tunneling | , | ||
"IU" | , | ||
SCTPCTL_UDP_TUNNELING_PORT_DESC | |||
) |