Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\net\inet_hashtables.h Create Date:2022-07-28 06:41:33
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__inet_lookup

Proto:static inline struct sock *__inet_lookup(struct net *net, struct inet_hashinfo *hashinfo, struct sk_buff *skb, int doff, const __be32 saddr, const __be16 sport, const __be32 daddr, const __be16 dport, const int dif, const int sdif, bool *refcounted)

Type:struct sock

Parameter:

TypeParameterName
struct net *net
struct inet_hashinfo *hashinfo
struct sk_buff *skb
intdoff
const __be32saddr
const __be16sport
const __be32daddr
const __be16dport
const intdif
const intsdif
bool *refcounted
343  hnum = ntohs(dport)
346  sk = Sockets in TCP_CLOSE state are _always_ taken out of the hash, so we need* not check it for lookups anymore, thanks Alexey. -DaveM
348  * refcounted = true
349  If sk Then Return sk
351  * refcounted = false
352  Return __inet_lookup_listener(net, hashinfo, skb, doff, saddr, sport, daddr, hnum, dif, sdif)