linux - how can I get the saddress from the struct "skbuff" -
I have a program that requires the source address from the structure "skebf", in the previous kernel version, I have the following Get the "saddr" by using the line:
static __u32 get_src_ip (concert skibb * skb) {return ntohl (skb-> nh.iph-> saddr); } The following error message is:
Error: 'const struct sk_buff' is not a member of 'nh' Who can tell me the right code? Thanks!
sk_buff has changed the configuration name from Linux 2.6.22. Instead, you'll see the skb-> Network_header should be used
OK, you may have to change too many member variable names - just in the context of the latest manual
Comments
Post a Comment