Hi all,
I want to re-calculate checksum of an udp packet,
When I grep freebsd code I found below line:
When try to use above method in my userland code I got linker error:
How can I use in_cksum method in my userland code?
thanks in advance,
yavuz
I want to re-calculate checksum of an udp packet,
When I grep freebsd code I found below line:
Code:
(/usr/src/sys/netinet/udp_usrreq.c)
uh_sum = in_cksum(m, len + sizeof (struct ip));
When try to use above method in my userland code I got linker error:
Code:
yavuzg# gcc -o out divert_out.c
/var/tmp//cczSfAd4.o(.text+0x266): In function `main':
: undefined reference to `in_cksum_skip'
How can I use in_cksum method in my userland code?
thanks in advance,
yavuz