#define pr_fmt(fmt) …
#include <linux/module.h>
#include <linux/init.h>
#include <linux/netdevice.h>
#include <linux/inetdevice.h>
#include <linux/seq_file.h>
#include <linux/memblock.h>
#include <linux/highmem.h>
#include <linux/slab.h>
#include <net/net_namespace.h>
#include <net/protocol.h>
#include <net/ip.h>
#include <net/ipv6.h>
#include <net/route.h>
#include <net/sctp/sctp.h>
#include <net/addrconf.h>
#include <net/inet_common.h>
#include <net/inet_ecn.h>
#include <net/udp_tunnel.h>
#define MAX_SCTP_PORT_HASH_ENTRIES …
struct sctp_globals sctp_globals __read_mostly;
struct idr sctp_assocs_id;
DEFINE_SPINLOCK(…);
static struct sctp_pf *sctp_pf_inet6_specific;
static struct sctp_pf *sctp_pf_inet_specific;
static struct sctp_af *sctp_af_v4_specific;
static struct sctp_af *sctp_af_v6_specific;
struct kmem_cache *sctp_chunk_cachep __read_mostly;
struct kmem_cache *sctp_bucket_cachep __read_mostly;
long sysctl_sctp_mem[3];
int sysctl_sctp_rmem[3];
int sysctl_sctp_wmem[3];
static void sctp_v4_copy_addrlist(struct list_head *addrlist,
struct net_device *dev)
{ … }
static void sctp_get_local_addr_list(struct net *net)
{ … }
static void sctp_free_local_addr_list(struct net *net)
{ … }
int sctp_copy_local_addr_list(struct net *net, struct sctp_bind_addr *bp,
enum sctp_scope scope, gfp_t gfp, int copy_flags)
{ … }
static void sctp_v4_copy_ip_options(struct sock *sk, struct sock *newsk)
{ … }
static int sctp_v4_ip_options_len(struct sock *sk)
{ … }
static void sctp_v4_from_skb(union sctp_addr *addr, struct sk_buff *skb,
int is_saddr)
{ … }
static void sctp_v4_from_sk(union sctp_addr *addr, struct sock *sk)
{ … }
static void sctp_v4_to_sk_saddr(union sctp_addr *addr, struct sock *sk)
{ … }
static void sctp_v4_to_sk_daddr(union sctp_addr *addr, struct sock *sk)
{ … }
static bool sctp_v4_from_addr_param(union sctp_addr *addr,
union sctp_addr_param *param,
__be16 port, int iif)
{ … }
static int sctp_v4_to_addr_param(const union sctp_addr *addr,
union sctp_addr_param *param)
{ … }
static void sctp_v4_dst_saddr(union sctp_addr *saddr, struct flowi4 *fl4,
__be16 port)
{ … }
static int sctp_v4_cmp_addr(const union sctp_addr *addr1,
const union sctp_addr *addr2)
{ … }
static void sctp_v4_inaddr_any(union sctp_addr *addr, __be16 port)
{ … }
static int sctp_v4_is_any(const union sctp_addr *addr)
{ … }
static int sctp_v4_addr_valid(union sctp_addr *addr,
struct sctp_sock *sp,
const struct sk_buff *skb)
{ … }
static int sctp_v4_available(union sctp_addr *addr, struct sctp_sock *sp)
{ … }
static enum sctp_scope sctp_v4_scope(union sctp_addr *addr)
{ … }
static void sctp_v4_get_dst(struct sctp_transport *t, union sctp_addr *saddr,
struct flowi *fl, struct sock *sk)
{ … }
static void sctp_v4_get_saddr(struct sctp_sock *sk,
struct sctp_transport *t,
struct flowi *fl)
{ … }
static int sctp_v4_skb_iif(const struct sk_buff *skb)
{ … }
static int sctp_v4_skb_sdif(const struct sk_buff *skb)
{ … }
static int sctp_v4_is_ce(const struct sk_buff *skb)
{ … }
static struct sock *sctp_v4_create_accept_sk(struct sock *sk,
struct sctp_association *asoc,
bool kern)
{ … }
static int sctp_v4_addr_to_user(struct sctp_sock *sp, union sctp_addr *addr)
{ … }
static void sctp_v4_seq_dump_addr(struct seq_file *seq, union sctp_addr *addr)
{ … }
static void sctp_v4_ecn_capable(struct sock *sk)
{ … }
static void sctp_addr_wq_timeout_handler(struct timer_list *t)
{ … }
static void sctp_free_addr_wq(struct net *net)
{ … }
static struct sctp_sockaddr_entry *sctp_addr_wq_lookup(struct net *net,
struct sctp_sockaddr_entry *addr)
{ … }
void sctp_addr_wq_mgmt(struct net *net, struct sctp_sockaddr_entry *addr, int cmd)
{ … }
static int sctp_inetaddr_event(struct notifier_block *this, unsigned long ev,
void *ptr)
{ … }
static int sctp_ctl_sock_init(struct net *net)
{ … }
static int sctp_udp_rcv(struct sock *sk, struct sk_buff *skb)
{ … }
int sctp_udp_sock_start(struct net *net)
{ … }
void sctp_udp_sock_stop(struct net *net)
{ … }
int sctp_register_af(struct sctp_af *af)
{ … }
struct sctp_af *sctp_get_af_specific(sa_family_t family)
{ … }
static void sctp_inet_msgname(char *msgname, int *addr_len)
{ … }
static void sctp_inet_event_msgname(struct sctp_ulpevent *event, char *msgname,
int *addr_len)
{ … }
static void sctp_inet_skb_msgname(struct sk_buff *skb, char *msgname, int *len)
{ … }
static int sctp_inet_af_supported(sa_family_t family, struct sctp_sock *sp)
{ … }
static int sctp_inet_cmp_addr(const union sctp_addr *addr1,
const union sctp_addr *addr2,
struct sctp_sock *opt)
{ … }
static int sctp_inet_bind_verify(struct sctp_sock *opt, union sctp_addr *addr)
{ … }
static int sctp_inet_send_verify(struct sctp_sock *opt, union sctp_addr *addr)
{ … }
static int sctp_inet_supported_addrs(const struct sctp_sock *opt,
__be16 *types)
{ … }
static inline int sctp_v4_xmit(struct sk_buff *skb, struct sctp_transport *t)
{ … }
static struct sctp_af sctp_af_inet;
static struct sctp_pf sctp_pf_inet = …;
static struct notifier_block sctp_inetaddr_notifier = …;
static const struct proto_ops inet_seqpacket_ops = …;
static struct inet_protosw sctp_seqpacket_protosw = …;
static struct inet_protosw sctp_stream_protosw = …;
static int sctp4_rcv(struct sk_buff *skb)
{ … }
static const struct net_protocol sctp_protocol = …;
static struct sctp_af sctp_af_inet = …;
struct sctp_pf *sctp_get_pf_specific(sa_family_t family)
{ … }
int sctp_register_pf(struct sctp_pf *pf, sa_family_t family)
{ … }
static inline int init_sctp_mibs(struct net *net)
{ … }
static inline void cleanup_sctp_mibs(struct net *net)
{ … }
static void sctp_v4_pf_init(void)
{ … }
static void sctp_v4_pf_exit(void)
{ … }
static int sctp_v4_protosw_init(void)
{ … }
static void sctp_v4_protosw_exit(void)
{ … }
static int sctp_v4_add_protocol(void)
{ … }
static void sctp_v4_del_protocol(void)
{ … }
static int __net_init sctp_defaults_init(struct net *net)
{ … }
static void __net_exit sctp_defaults_exit(struct net *net)
{ … }
static struct pernet_operations sctp_defaults_ops = …;
static int __net_init sctp_ctrlsock_init(struct net *net)
{ … }
static void __net_exit sctp_ctrlsock_exit(struct net *net)
{ … }
static struct pernet_operations sctp_ctrlsock_ops = …;
static __init int sctp_init(void)
{ … }
static __exit void sctp_exit(void)
{ … }
module_init(…) …;
module_exit(sctp_exit);
MODULE_ALIAS(…) …;
MODULE_ALIAS(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
module_param_named(no_checksums, sctp_checksum_disable, bool, 0644);
MODULE_PARM_DESC(…) …;
MODULE_LICENSE(…) …;