TCP Checksums in mbufs
lee at nerds.org.uk
Mon Jan 8 21:09:00 UTC 2007
I have a bit of code I have written that uses pfil to access network
traffic as it passes between interfaces on a FreeBSD router. One of
the functions it performs is some incredibly basic rewrites of certain
packets (keeping the same length, so no issues about sequence
numbers), but it does alter the payload.
I just wanted to check what is the "proper" way to be going about
recalculating the checksums on the packet? I can write a function to
do this and write this into the packet stored in the mbuf directly,
however I wasn't sure if there was a more acceptable method such as
flagging it to be re-checksum'd as it's routed, or to offload the
computation to the NIC or something?
Any thoughts, suggestions, etc very welcome!
By the way, I'm not subscribed to the list right now, so I'd
appreciate it if people could CC me on replies.
Lee Brotherston - <lee at nerds.org.uk>
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2241 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20070108/74dec0a0/smime.bin
More information about the freebsd-hackers