Subject: Re: tcp/udp vector h/w checksum
To: None <heas@shrubbery.net>
From: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
List: tech-net
Date: 02/06/2005 04:58:42
hi,
> --- netinet/ip_output.c 15 Dec 2004 04:25:19 -0000 1.138
> +++ netinet/ip_output.c 5 Feb 2005 18:14:51 -0000
> @@ -128,6 +128,8 @@
> #include <netinet/in_pcb.h>
> #include <netinet/in_var.h>
> #include <netinet/ip_var.h>
> +#include <netinet/tcp.h>
> +#include <netinet/udp.h>
why you need these includes? isn't m_pkthdr.csum_data enough?
> + th = (struct tcphdr *) (mtod(m, caddr_t) +
> + hlen);
> + th->th_sum = in_cksum_phdr(ip->ip_src.s_addr,
i don't think you can assume m->m_len is large enough.
YAMAMOTO Takashi