函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\net\inet_hashtables.h Create Date:2022-07-27 07:39:10
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__inet_lookup

函数原型: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)

返回类型:struct sock

参数:

类型参数名称
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  如果sk则返回:sk
351  * refcounted = false
352  返回:__inet_lookup_listener(net, hashinfo, skb, doff, saddr, sport, daddr, hnum, dif, sdif)
调用者
名称描述
inet_lookup
__inet_lookup_skb