Last active
July 23, 2019 04:28
-
-
Save kkumar-fk/1f9c023dcc1b59563bd98eb9d3cfcfc3 to your computer and use it in GitHub Desktop.
code chunk
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct sock *__inet_lookup_skb(tcp_hashinfo, skb, src_port, dst_port) | |
{ | |
/* Get the IPv4 header to know the source and destination IP's */ | |
const struct iphdr *iph = ip_hdr(skb); | |
/* | |
* Look up the incoming skb in tcp_hashinfo using the | |
* [ Source-IP:Port, Destination-IP:Port ] tuple. | |
*/ | |
return __inet_lookup(tcp_hashinfo, skb, iph->saddr, src_port, iph->daddr, dst_port); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment