From: Bjørn Mork <bj...@mork.no>
Date: Wed, 08 Feb 2017 10:55:50 +0100

> Stefan Brüns <stefan.bru...@rwth-aachen.de> writes:
> 
>> If a context is configured as dualstack ("IPv4v6"), the modem indicates
>> the context activation with a slightly different indication message.
>> The dual-stack indication omits the link_type (IPv4/v6) and adds
>> additional address fields.
> 
> Great!
> 
>> IPv6 LSIs are identical to IPv4 LSIs, but have a different link type.
>> +struct lsi_umts_dual {
>> +    struct lsi_umts lsi;
>> +    u8 pdp_addr4_len; /* NW-supplied PDP IPv4 address len */
>> +    u8 pdp_addr4[4];  /* NW-supplied PDP IPv4 address (bigendian)) */
>> +    u8 pdp_addr6_len; /* NW-supplied PDP IPv6 address len */
>> +    u8 pdp_addr6[16]; /* NW-supplied PDP IPv6 address (bigendian)) */
> 
> 
> Maybe use "struct in_addr" and "struct in6_addr" for all the address
> fields, making them a bit more accessible and avoiding having to define
> endianness explicitly?

Can't do that, it will add padding to the structure and not match
what is really in the header.

The problem is that we get a "u8" length first which starts the
address on an odd byte.

And we don't want to use "__packed" to fix this either.

Reply via email to