problem in if_tap.c

2008-04-14 Thread Marc Lörner
Hello, I found the following problem in the if_tap-device code in function tapcreate when used on 64-bit systems: TAPDEBUG("tapcreate(%s%d). minor = %#x\n", name, unit, minor(dev)); /* generate fake MAC address: 00 bd xx xx xx unit_no */ macaddr_hi = htons(0x00bd);

Unaligned references in /usr/src/sys/netinet6/in6.h

2008-06-03 Thread Marc Lörner
Hello, within testing on a ia64-platform I spotted unaligned references in the macros: IN6_IS_ADDR_UNSPECIFIED(a), IN6_IS_ADDR_LOOPBACK(a), IN6_IS_ADDR_V4COMPAT(a) and IN6_IS_ADDR_V4MAPPED(a) It's not always true that the s6_addr array is aligned to 4-byte and this causes some trouble at least

Probable Bug in tcp.h

2008-06-05 Thread Marc Lörner
Hello, I probably found a bug in declaration of "struct tcphdr"! struct tcphdr { u_short th_sport; /* source port */ u_short th_dport; /* destination port */ tcp_seq th_seq; /* sequence number */ tcp_seq th_ack;

Re: Probable Bug in tcp.h

2008-06-06 Thread Marc Lörner
On Thursday 05 June 2008 17:56, Rui Paulo wrote: > On Thu, Jun 05, 2008 at 05:12:47PM +0200, =?ISO-8859-1?Q?Marc_L=F6rner_ wrote: > > Hello, > > I probably found a bug in declaration of "struct tcphdr"! > > > > struct tcphdr { > > u_short th_sport; /* source port */ > > u_sho

Re: Probable Bug in tcp.h

2008-06-06 Thread Marc Lörner
On Thursday 05 June 2008 18:09, Bruce M. Simpson wrote: > Marc Lörner wrote: > > .. > > First of all I have the problam of misalignment of th_off. Because in > > this way always 4 bytes are read and the the bits of th_off are replaced. > > Then the 4 bytes are writt

Re: Probable Bug in tcp.h

2008-06-06 Thread Marc Lörner
On Friday 06 June 2008 09:52, Peter Jeremy wrote: > On 2008-Jun-06 09:30:28 +0200, Marc Lörner <[EMAIL PROTECTED]> wrote: > >th_x2 and th_off are created as a bitfield. But C-Standard says that > >bitfields are accessed as integers => 4-bytes > > > >On itaniu

Re: Probable Bug in tcp.h

2008-06-09 Thread Marc Lörner
On Friday 06 June 2008 14:25, Bruce Evans wrote: > On Fri, 6 Jun 2008, Marc [iso-8859-1] Lörner wrote: > > On Friday 06 June 2008 09:52, Peter Jeremy wrote: > >> I gather from this comment that you have some code using struct tcphdr > >> that is getting alignment errors. struct tcphdr is extensive