Linux anchor 4.4.0-210-generic #242-Ubuntu SMP Fri Apr 16 09:57:56 UTC 2021 x86_64
Apache/2.4.18 (Ubuntu)
Server IP : 10.10.100.4 & Your IP : 216.73.217.150
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
src /
linux-headers-4.4.0-119 /
include /
net /
Delete
Unzip
Name
Size
Permission
Date
Action
9p
[ DIR ]
drwxr-xr-x
2018-04-05 07:11
bluetooth
[ DIR ]
drwxr-xr-x
2018-04-05 07:11
caif
[ DIR ]
drwxr-xr-x
2018-04-05 07:11
irda
[ DIR ]
drwxr-xr-x
2018-04-05 07:11
iucv
[ DIR ]
drwxr-xr-x
2018-04-05 07:11
netfilter
[ DIR ]
drwxr-xr-x
2018-04-05 07:11
netns
[ DIR ]
drwxr-xr-x
2018-04-05 07:11
nfc
[ DIR ]
drwxr-xr-x
2018-04-05 07:11
phonet
[ DIR ]
drwxr-xr-x
2018-04-05 07:11
sctp
[ DIR ]
drwxr-xr-x
2018-04-05 07:11
tc_act
[ DIR ]
drwxr-xr-x
2018-04-05 07:11
6lowpan.h
7.53
KB
-rw-r--r--
2016-01-11 00:01
Space.h
1.12
KB
-rw-r--r--
2016-01-11 00:01
act_api.h
4.21
KB
-rw-r--r--
2016-01-11 00:01
addrconf.h
11.45
KB
-rw-r--r--
2018-04-02 18:07
af_ieee802154.h
1.55
KB
-rw-r--r--
2016-01-11 00:01
af_rxrpc.h
1.82
KB
-rw-r--r--
2016-01-11 00:01
af_unix.h
2.12
KB
-rw-r--r--
2018-04-02 18:07
af_vsock.h
6.17
KB
-rw-r--r--
2016-01-11 00:01
ah.h
343
B
-rw-r--r--
2016-01-11 00:01
arp.h
1.83
KB
-rw-r--r--
2018-04-02 18:07
atmclip.h
1.44
KB
-rw-r--r--
2016-01-11 00:01
ax25.h
14.53
KB
-rw-r--r--
2016-01-11 00:01
ax88796.h
998
B
-rw-r--r--
2016-01-11 00:01
bond_3ad.h
9.73
KB
-rw-r--r--
2016-01-11 00:01
bond_alb.h
6.6
KB
-rw-r--r--
2016-01-11 00:01
bond_options.h
3.82
KB
-rw-r--r--
2016-01-11 00:01
bonding.h
18.41
KB
-rw-r--r--
2018-04-02 18:07
busy_poll.h
3.97
KB
-rw-r--r--
2016-01-11 00:01
cfg80211-wext.h
1.95
KB
-rw-r--r--
2016-01-11 00:01
cfg80211.h
187.7
KB
-rw-r--r--
2018-04-02 18:07
cfg802154.h
10.59
KB
-rw-r--r--
2016-01-11 00:01
checksum.h
4.53
KB
-rw-r--r--
2016-01-11 00:01
cipso_ipv4.h
8.17
KB
-rw-r--r--
2018-04-02 18:07
cls_cgroup.h
2.03
KB
-rw-r--r--
2016-01-11 00:01
codel.h
11.37
KB
-rw-r--r--
2018-04-02 18:07
compat.h
2
KB
-rw-r--r--
2016-01-11 00:01
datalink.h
580
B
-rw-r--r--
2016-01-11 00:01
dcbevent.h
1.26
KB
-rw-r--r--
2016-01-11 00:01
dcbnl.h
4.2
KB
-rw-r--r--
2016-01-11 00:01
dn.h
7
KB
-rw-r--r--
2016-01-11 00:01
dn_dev.h
5.32
KB
-rw-r--r--
2016-01-11 00:01
dn_fib.h
3.91
KB
-rw-r--r--
2016-01-11 00:01
dn_neigh.h
929
B
-rw-r--r--
2016-01-11 00:01
dn_nsp.h
5.87
KB
-rw-r--r--
2016-01-11 00:01
dn_route.h
4.36
KB
-rw-r--r--
2016-01-11 00:01
dsa.h
8.93
KB
-rw-r--r--
2016-01-11 00:01
dsfield.h
1.07
KB
-rw-r--r--
2016-01-11 00:01
dst.h
13.42
KB
-rw-r--r--
2018-04-02 18:07
dst_metadata.h
3.61
KB
-rw-r--r--
2018-04-02 18:07
dst_ops.h
2.03
KB
-rw-r--r--
2018-04-02 18:07
esp.h
225
B
-rw-r--r--
2016-01-11 00:01
ethoc.h
538
B
-rw-r--r--
2016-01-11 00:01
fib_rules.h
2.99
KB
-rw-r--r--
2016-01-11 00:01
firewire.h
597
B
-rw-r--r--
2016-01-11 00:01
flow.h
6.78
KB
-rw-r--r--
2016-01-11 00:01
flow_dissector.h
4.84
KB
-rw-r--r--
2016-01-11 00:01
flowcache.h
561
B
-rw-r--r--
2016-01-11 00:01
fou.h
499
B
-rw-r--r--
2016-01-11 00:01
garp.h
2.58
KB
-rw-r--r--
2016-01-11 00:01
gen_stats.h
2.13
KB
-rw-r--r--
2016-01-11 00:01
genetlink.h
13.31
KB
-rw-r--r--
2018-04-02 18:07
geneve.h
1.82
KB
-rw-r--r--
2018-04-02 18:07
gre.h
661
B
-rw-r--r--
2016-01-11 00:01
gro_cells.h
1.94
KB
-rw-r--r--
2016-01-11 00:01
gue.h
3.19
KB
-rw-r--r--
2016-01-11 00:01
icmp.h
1.53
KB
-rw-r--r--
2016-01-11 00:01
ieee80211_radiotap.h
12.22
KB
-rw-r--r--
2016-01-11 00:01
ieee802154_netdev.h
9.13
KB
-rw-r--r--
2016-01-11 00:01
if_inet6.h
6.07
KB
-rw-r--r--
2016-01-11 00:01
inet6_connection_sock.h
1.1
KB
-rw-r--r--
2016-01-11 00:01
inet6_hashtables.h
3.25
KB
-rw-r--r--
2016-01-11 00:01
inet_common.h
1.6
KB
-rw-r--r--
2016-01-11 00:01
inet_connection_sock.h
10.41
KB
-rw-r--r--
2018-04-02 18:07
inet_ecn.h
6.02
KB
-rw-r--r--
2018-04-02 18:07
inet_frag.h
4.36
KB
-rw-r--r--
2018-04-02 18:07
inet_hashtables.h
12.02
KB
-rw-r--r--
2016-01-11 00:01
inet_sock.h
7.87
KB
-rw-r--r--
2018-04-02 18:07
inet_timewait_sock.h
4.11
KB
-rw-r--r--
2016-01-11 00:01
inetpeer.h
3.44
KB
-rw-r--r--
2016-01-11 00:01
ip.h
17.13
KB
-rw-r--r--
2018-04-02 18:07
ip6_checksum.h
2.91
KB
-rw-r--r--
2016-01-11 00:01
ip6_fib.h
7.21
KB
-rw-r--r--
2018-04-02 18:07
ip6_route.h
6.17
KB
-rw-r--r--
2018-04-02 18:07
ip6_tunnel.h
3.28
KB
-rw-r--r--
2018-04-02 18:07
ip_fib.h
9.36
KB
-rw-r--r--
2018-04-02 18:07
ip_tunnels.h
10.69
KB
-rw-r--r--
2018-04-02 18:07
ip_vs.h
46.13
KB
-rw-r--r--
2018-04-02 18:07
ipcomp.h
620
B
-rw-r--r--
2016-01-11 00:01
ipconfig.h
772
B
-rw-r--r--
2016-01-11 00:01
ipv6.h
28.59
KB
-rw-r--r--
2018-04-02 18:07
ipx.h
4.32
KB
-rw-r--r--
2016-01-11 00:01
iw_handler.h
22.21
KB
-rw-r--r--
2018-04-02 18:07
l3mdev.h
5.18
KB
-rw-r--r--
2018-04-02 18:07
lapb.h
4.69
KB
-rw-r--r--
2016-01-11 00:01
lib80211.h
3.88
KB
-rw-r--r--
2016-01-11 00:01
llc.h
4.25
KB
-rw-r--r--
2016-01-11 00:01
llc_c_ac.h
9.34
KB
-rw-r--r--
2016-01-11 00:01
llc_c_ev.h
10.68
KB
-rw-r--r--
2016-01-11 00:01
llc_c_st.h
1.72
KB
-rw-r--r--
2016-01-11 00:01
llc_conn.h
4
KB
-rw-r--r--
2016-01-11 00:01
llc_if.h
2.16
KB
-rw-r--r--
2016-01-11 00:01
llc_pdu.h
14.08
KB
-rw-r--r--
2016-01-11 00:01
llc_s_ac.h
1.55
KB
-rw-r--r--
2016-01-11 00:01
llc_s_ev.h
2.2
KB
-rw-r--r--
2016-01-11 00:01
llc_s_st.h
947
B
-rw-r--r--
2016-01-11 00:01
llc_sap.h
1.08
KB
-rw-r--r--
2016-01-11 00:01
lwtunnel.h
4.07
KB
-rw-r--r--
2016-01-11 00:01
mac80211.h
212.7
KB
-rw-r--r--
2018-04-02 18:07
mac802154.h
12.1
KB
-rw-r--r--
2016-01-11 00:01
mip6.h
1.58
KB
-rw-r--r--
2016-01-11 00:01
mld.h
2.76
KB
-rw-r--r--
2016-01-11 00:01
mpls.h
1.14
KB
-rw-r--r--
2016-01-11 00:01
mpls_iptunnel.h
815
B
-rw-r--r--
2016-01-11 00:01
mrp.h
2.99
KB
-rw-r--r--
2016-01-11 00:01
ndisc.h
5.75
KB
-rw-r--r--
2018-04-02 18:07
neighbour.h
14.16
KB
-rw-r--r--
2016-01-11 00:01
net_namespace.h
9.2
KB
-rw-r--r--
2018-04-02 18:07
net_ratelimit.h
181
B
-rw-r--r--
2016-01-11 00:01
netevent.h
739
B
-rw-r--r--
2016-01-11 00:01
netlabel.h
17.25
KB
-rw-r--r--
2016-01-11 00:01
netlink.h
36.13
KB
-rw-r--r--
2016-01-11 00:01
netprio_cgroup.h
1.08
KB
-rw-r--r--
2016-01-11 00:01
netrom.h
7.61
KB
-rw-r--r--
2016-01-11 00:01
nexthop.h
821
B
-rw-r--r--
2016-01-11 00:01
nl802154.h
11.89
KB
-rw-r--r--
2016-01-11 00:01
p8022.h
408
B
-rw-r--r--
2016-01-11 00:01
ping.h
3.52
KB
-rw-r--r--
2016-01-11 00:01
pkt_cls.h
9.61
KB
-rw-r--r--
2018-04-02 18:07
pkt_sched.h
3.77
KB
-rw-r--r--
2016-01-11 00:01
protocol.h
4.09
KB
-rw-r--r--
2016-01-11 00:01
psnap.h
312
B
-rw-r--r--
2016-01-11 00:01
raw.h
1.84
KB
-rw-r--r--
2016-01-11 00:01
rawv6.h
543
B
-rw-r--r--
2016-01-11 00:01
red.h
10.03
KB
-rw-r--r--
2016-01-11 00:01
regulatory.h
10.12
KB
-rw-r--r--
2016-01-11 00:01
request_sock.h
6.38
KB
-rw-r--r--
2016-01-11 00:01
rose.h
7.59
KB
-rw-r--r--
2016-01-11 00:01
route.h
9.35
KB
-rw-r--r--
2016-01-11 00:01
rtnetlink.h
5.37
KB
-rw-r--r--
2016-01-11 00:01
sch_generic.h
20.05
KB
-rw-r--r--
2018-04-02 18:07
scm.h
3.44
KB
-rw-r--r--
2018-04-02 18:07
secure_seq.h
677
B
-rw-r--r--
2016-01-11 00:01
slhc_vj.h
6.63
KB
-rw-r--r--
2016-01-11 00:01
snmp.h
5.75
KB
-rw-r--r--
2016-01-11 00:01
sock.h
64.74
KB
-rw-r--r--
2018-04-02 18:07
stp.h
344
B
-rw-r--r--
2016-01-11 00:01
switchdev.h
8.81
KB
-rw-r--r--
2018-04-02 18:07
tcp.h
54.1
KB
-rw-r--r--
2018-04-02 18:07
tcp_memcontrol.h
254
B
-rw-r--r--
2016-01-11 00:01
tcp_states.h
1.26
KB
-rw-r--r--
2016-01-11 00:01
timewait_sock.h
1.11
KB
-rw-r--r--
2016-01-11 00:01
transp_v6.h
1.83
KB
-rw-r--r--
2016-01-11 00:01
tso.h
446
B
-rw-r--r--
2016-01-11 00:01
udp.h
9.77
KB
-rw-r--r--
2016-01-11 00:01
udp_tunnel.h
3.24
KB
-rw-r--r--
2016-01-11 00:01
udplite.h
3.75
KB
-rw-r--r--
2016-01-11 00:01
vsock_addr.h
1.05
KB
-rw-r--r--
2016-01-11 00:01
vxlan.h
6.99
KB
-rw-r--r--
2018-04-02 18:07
wext.h
1.47
KB
-rw-r--r--
2016-01-11 00:01
wimax.h
19.97
KB
-rw-r--r--
2016-01-11 00:01
x25.h
9.35
KB
-rw-r--r--
2016-01-11 00:01
x25device.h
348
B
-rw-r--r--
2016-01-11 00:01
xfrm.h
49.3
KB
-rw-r--r--
2018-04-02 18:07
Save
Rename
/* * INET An implementation of the TCP/IP protocol suite for the LINUX * operating system. INET is implemented using the BSD Socket * interface as the means of communication with the user level. * * Authors: Lotsa people, from code originally in tcp * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ #ifndef _INET_HASHTABLES_H #define _INET_HASHTABLES_H #include <linux/interrupt.h> #include <linux/ip.h> #include <linux/ipv6.h> #include <linux/list.h> #include <linux/slab.h> #include <linux/socket.h> #include <linux/spinlock.h> #include <linux/types.h> #include <linux/wait.h> #include <net/inet_connection_sock.h> #include <net/inet_sock.h> #include <net/sock.h> #include <net/route.h> #include <net/tcp_states.h> #include <net/netns/hash.h> #include <linux/atomic.h> #include <asm/byteorder.h> /* This is for all connections with a full identity, no wildcards. * The 'e' prefix stands for Establish, but we really put all sockets * but LISTEN ones. */ struct inet_ehash_bucket { struct hlist_nulls_head chain; }; /* There are a few simple rules, which allow for local port reuse by * an application. In essence: * * 1) Sockets bound to different interfaces may share a local port. * Failing that, goto test 2. * 2) If all sockets have sk->sk_reuse set, and none of them are in * TCP_LISTEN state, the port may be shared. * Failing that, goto test 3. * 3) If all sockets are bound to a specific inet_sk(sk)->rcv_saddr local * address, and none of them are the same, the port may be * shared. * Failing this, the port cannot be shared. * * The interesting point, is test #2. This is what an FTP server does * all day. To optimize this case we use a specific flag bit defined * below. As we add sockets to a bind bucket list, we perform a * check of: (newsk->sk_reuse && (newsk->sk_state != TCP_LISTEN)) * As long as all sockets added to a bind bucket pass this test, * the flag bit will be set. * The resulting situation is that tcp_v[46]_verify_bind() can just check * for this flag bit, if it is set and the socket trying to bind has * sk->sk_reuse set, we don't even have to walk the owners list at all, * we return that it is ok to bind this socket to the requested local port. * * Sounds like a lot of work, but it is worth it. In a more naive * implementation (ie. current FreeBSD etc.) the entire list of ports * must be walked for each data port opened by an ftp server. Needless * to say, this does not scale at all. With a couple thousand FTP * users logged onto your box, isn't it nice to know that new data * ports are created in O(1) time? I thought so. ;-) -DaveM */ struct inet_bind_bucket { possible_net_t ib_net; unsigned short port; signed char fastreuse; signed char fastreuseport; kuid_t fastuid; int num_owners; struct hlist_node node; struct hlist_head owners; }; static inline struct net *ib_net(struct inet_bind_bucket *ib) { return read_pnet(&ib->ib_net); } #define inet_bind_bucket_for_each(tb, head) \ hlist_for_each_entry(tb, head, node) struct inet_bind_hashbucket { spinlock_t lock; struct hlist_head chain; }; /* * Sockets can be hashed in established or listening table * We must use different 'nulls' end-of-chain value for listening * hash table, or we might find a socket that was closed and * reallocated/inserted into established hash table */ #define LISTENING_NULLS_BASE (1U << 29) struct inet_listen_hashbucket { spinlock_t lock; struct hlist_nulls_head head; }; /* This is for listening sockets, thus all sockets which possess wildcards. */ #define INET_LHTABLE_SIZE 32 /* Yes, really, this is all you need. */ struct inet_hashinfo { /* This is for sockets with full identity only. Sockets here will * always be without wildcards and will have the following invariant: * * TCP_ESTABLISHED <= sk->sk_state < TCP_CLOSE * */ struct inet_ehash_bucket *ehash; spinlock_t *ehash_locks; unsigned int ehash_mask; unsigned int ehash_locks_mask; /* Ok, let's try this, I give up, we do need a local binding * TCP hash as well as the others for fast bind/connect. */ struct inet_bind_hashbucket *bhash; unsigned int bhash_size; /* 4 bytes hole on 64 bit */ struct kmem_cache *bind_bucket_cachep; /* All the above members are written once at bootup and * never written again _or_ are predominantly read-access. * * Now align to a new cache line as all the following members * might be often dirty. */ /* All sockets in TCP_LISTEN state will be in here. This is the only * table where wildcard'd TCP sockets can exist. Hash function here * is just local port number. */ struct inet_listen_hashbucket listening_hash[INET_LHTABLE_SIZE] ____cacheline_aligned_in_smp; }; static inline struct inet_ehash_bucket *inet_ehash_bucket( struct inet_hashinfo *hashinfo, unsigned int hash) { return &hashinfo->ehash[hash & hashinfo->ehash_mask]; } static inline spinlock_t *inet_ehash_lockp( struct inet_hashinfo *hashinfo, unsigned int hash) { return &hashinfo->ehash_locks[hash & hashinfo->ehash_locks_mask]; } int inet_ehash_locks_alloc(struct inet_hashinfo *hashinfo); static inline void inet_ehash_locks_free(struct inet_hashinfo *hashinfo) { kvfree(hashinfo->ehash_locks); hashinfo->ehash_locks = NULL; } struct inet_bind_bucket * inet_bind_bucket_create(struct kmem_cache *cachep, struct net *net, struct inet_bind_hashbucket *head, const unsigned short snum); void inet_bind_bucket_destroy(struct kmem_cache *cachep, struct inet_bind_bucket *tb); static inline u32 inet_bhashfn(const struct net *net, const __u16 lport, const u32 bhash_size) { return (lport + net_hash_mix(net)) & (bhash_size - 1); } void inet_bind_hash(struct sock *sk, struct inet_bind_bucket *tb, const unsigned short snum); /* These can have wildcards, don't try too hard. */ static inline u32 inet_lhashfn(const struct net *net, const unsigned short num) { return (num + net_hash_mix(net)) & (INET_LHTABLE_SIZE - 1); } static inline int inet_sk_listen_hashfn(const struct sock *sk) { return inet_lhashfn(sock_net(sk), inet_sk(sk)->inet_num); } /* Caller must disable local BH processing. */ int __inet_inherit_port(const struct sock *sk, struct sock *child); void inet_put_port(struct sock *sk); void inet_hashinfo_init(struct inet_hashinfo *h); bool inet_ehash_insert(struct sock *sk, struct sock *osk); bool inet_ehash_nolisten(struct sock *sk, struct sock *osk); void __inet_hash(struct sock *sk, struct sock *osk); void inet_hash(struct sock *sk); void inet_unhash(struct sock *sk); struct sock *__inet_lookup_listener(struct net *net, struct inet_hashinfo *hashinfo, const __be32 saddr, const __be16 sport, const __be32 daddr, const unsigned short hnum, const int dif); static inline struct sock *inet_lookup_listener(struct net *net, struct inet_hashinfo *hashinfo, __be32 saddr, __be16 sport, __be32 daddr, __be16 dport, int dif) { return __inet_lookup_listener(net, hashinfo, saddr, sport, daddr, ntohs(dport), dif); } /* Socket demux engine toys. */ /* What happens here is ugly; there's a pair of adjacent fields in struct inet_sock; __be16 dport followed by __u16 num. We want to search by pair, so we combine the keys into a single 32bit value and compare with 32bit value read from &...->dport. Let's at least make sure that it's not mixed with anything else... On 64bit targets we combine comparisons with pair of adjacent __be32 fields in the same way. */ #ifdef __BIG_ENDIAN #define INET_COMBINED_PORTS(__sport, __dport) \ ((__force __portpair)(((__force __u32)(__be16)(__sport) << 16) | (__u32)(__dport))) #else /* __LITTLE_ENDIAN */ #define INET_COMBINED_PORTS(__sport, __dport) \ ((__force __portpair)(((__u32)(__dport) << 16) | (__force __u32)(__be16)(__sport))) #endif #if (BITS_PER_LONG == 64) #ifdef __BIG_ENDIAN #define INET_ADDR_COOKIE(__name, __saddr, __daddr) \ const __addrpair __name = (__force __addrpair) ( \ (((__force __u64)(__be32)(__saddr)) << 32) | \ ((__force __u64)(__be32)(__daddr))) #else /* __LITTLE_ENDIAN */ #define INET_ADDR_COOKIE(__name, __saddr, __daddr) \ const __addrpair __name = (__force __addrpair) ( \ (((__force __u64)(__be32)(__daddr)) << 32) | \ ((__force __u64)(__be32)(__saddr))) #endif /* __BIG_ENDIAN */ #define INET_MATCH(__sk, __net, __cookie, __saddr, __daddr, __ports, __dif) \ (((__sk)->sk_portpair == (__ports)) && \ ((__sk)->sk_addrpair == (__cookie)) && \ (!(__sk)->sk_bound_dev_if || \ ((__sk)->sk_bound_dev_if == (__dif))) && \ net_eq(sock_net(__sk), (__net))) #else /* 32-bit arch */ #define INET_ADDR_COOKIE(__name, __saddr, __daddr) \ const int __name __deprecated __attribute__((unused)) #define INET_MATCH(__sk, __net, __cookie, __saddr, __daddr, __ports, __dif) \ (((__sk)->sk_portpair == (__ports)) && \ ((__sk)->sk_daddr == (__saddr)) && \ ((__sk)->sk_rcv_saddr == (__daddr)) && \ (!(__sk)->sk_bound_dev_if || \ ((__sk)->sk_bound_dev_if == (__dif))) && \ net_eq(sock_net(__sk), (__net))) #endif /* 64-bit arch */ /* * Sockets in TCP_CLOSE state are _always_ taken out of the hash, so we need * not check it for lookups anymore, thanks Alexey. -DaveM * * Local BH must be disabled here. */ struct sock *__inet_lookup_established(struct net *net, struct inet_hashinfo *hashinfo, const __be32 saddr, const __be16 sport, const __be32 daddr, const u16 hnum, const int dif); static inline struct sock * inet_lookup_established(struct net *net, struct inet_hashinfo *hashinfo, const __be32 saddr, const __be16 sport, const __be32 daddr, const __be16 dport, const int dif) { return __inet_lookup_established(net, hashinfo, saddr, sport, daddr, ntohs(dport), dif); } static inline struct sock *__inet_lookup(struct net *net, struct inet_hashinfo *hashinfo, const __be32 saddr, const __be16 sport, const __be32 daddr, const __be16 dport, const int dif) { u16 hnum = ntohs(dport); struct sock *sk = __inet_lookup_established(net, hashinfo, saddr, sport, daddr, hnum, dif); return sk ? : __inet_lookup_listener(net, hashinfo, saddr, sport, daddr, hnum, dif); } static inline struct sock *inet_lookup(struct net *net, struct inet_hashinfo *hashinfo, const __be32 saddr, const __be16 sport, const __be32 daddr, const __be16 dport, const int dif) { struct sock *sk; local_bh_disable(); sk = __inet_lookup(net, hashinfo, saddr, sport, daddr, dport, dif); local_bh_enable(); return sk; } static inline struct sock *__inet_lookup_skb(struct inet_hashinfo *hashinfo, struct sk_buff *skb, const __be16 sport, const __be16 dport) { struct sock *sk = skb_steal_sock(skb); const struct iphdr *iph = ip_hdr(skb); if (sk) return sk; else return __inet_lookup(dev_net(skb_dst(skb)->dev), hashinfo, iph->saddr, sport, iph->daddr, dport, inet_iif(skb)); } u32 sk_ehashfn(const struct sock *sk); u32 inet6_ehashfn(const struct net *net, const struct in6_addr *laddr, const u16 lport, const struct in6_addr *faddr, const __be16 fport); static inline void sk_daddr_set(struct sock *sk, __be32 addr) { sk->sk_daddr = addr; /* alias of inet_daddr */ #if IS_ENABLED(CONFIG_IPV6) ipv6_addr_set_v4mapped(addr, &sk->sk_v6_daddr); #endif } static inline void sk_rcv_saddr_set(struct sock *sk, __be32 addr) { sk->sk_rcv_saddr = addr; /* alias of inet_rcv_saddr */ #if IS_ENABLED(CONFIG_IPV6) ipv6_addr_set_v4mapped(addr, &sk->sk_v6_rcv_saddr); #endif } int __inet_hash_connect(struct inet_timewait_death_row *death_row, struct sock *sk, u32 port_offset, int (*check_established)(struct inet_timewait_death_row *, struct sock *, __u16, struct inet_timewait_sock **)); int inet_hash_connect(struct inet_timewait_death_row *death_row, struct sock *sk); #endif /* _INET_HASHTABLES_H */