函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:ip_route_connect

函数原型:static inline struct rtable *ip_route_connect(struct flowi4 *fl4, __be32 dst, __be32 src, u32 tos, int oif, u8 protocol, __be16 sport, __be16 dport, struct sock *sk)

返回类型:struct rtable

参数:

类型参数名称
struct flowi4 *fl4
__be32dst
__be32src
u32tos
intoif
u8protocol
__be16sport
__be16dport
struct sock *sk
306  net等于sock_net(sk)
309  p_route_connect() and ip_route_newports() work in tandem whilst* binding a socket for a new outgoing connection.* In order to use IPSEC properly, we must, in the end, have a* route that was looked up using all available keys including source
312  如果非dst或非src
313  rt等于__ip_route_output_key(net, fl4)
314  如果是错误则返回:rt
316  ip_rt_put(rt)
317  Reset some input parameters after previous lookup
319  security_sk_classify_flow(sk, flowi4_to_flowi(fl4))
320  返回:ip_route_output_flow(net, fl4, sk)