> >>> I've implemented the IPV6_RECVPATHMTU option adopting #3 approach. I
> >>> defined a new structure "ip6_mtuinfo" as ancillary data item for
> >>> IPV6_PATHMTU as follows:
> >>> struct ip6_mtuinfo {
> >>> u_int32_t ip6mtu_mtu;
> >>> struct sockaddr_in6 ip6mtu_dst;
> >>> };
> >> How do you think about alignment?
> >Currently, I only consider 32-bit alignment, but I'm open to hear
> >others' opinions.
> as this structure is host-local (will not appear on wire) there's no
> serious issue with alignment, I believe.
>=> I disagree, I'd like to be able to defined struct in6_addr as a pair
>of 64 bit integers one day (:-)!
I don't understand what you are saying, at all.
ip6mtu_dst will be aligned to the alignment whatever necessary for us,
depending on how your compiler aligns it. sockaddr_in6 includes
struct in6_addr (sin6_addr), and if you declare in6_addr like:
struct in6_addr {
union {
uint8_t foo8[16];
uint16_t foo16[8];
uint32_t foo32[4];
uint64_t foo32[2];
} foo;
};
ip6mtu_dst.sin6_addr should be aligned to 64bit boundary.
> ip6mtu_dst will be aligned to whatever look natural to the machine
> based on sockaddr_in6 declaration.
>=> please do something similar to in6_pktinfo...
itojun
--------------------------------------------------------------------
IETF IPng Working Group Mailing List
IPng Home Page: http://playground.sun.com/ipng
FTP archive: ftp://playground.sun.com/pub/ipng
Direct all administrative requests to [EMAIL PROTECTED]
--------------------------------------------------------------------
- Re: [advanced API] how to get the destinati... Erik Nordmark
- Re: IPV6_USEMTU socket option JINMEI Tatuya / 神明達哉
- Re: [advanced API] how to get the destinati... Francis Dupont
- Re: [advanced API] how to get the destinati... Tim Hartrick
- Re: [advanced API] how to get the dest... Alain Ritoux
- Re: [advanced API] how to get the destinati... Jun-ichiro itojun Hagino
- Re: [advanced API] how to get the destinati... Francis Dupont
- Re: [advanced API] how to get the destinati... JINMEI Tatuya / 神明達哉
- Re: [advanced API] how to get the dest... Francis Dupont
- Re: [advanced API] how to get the destinati... Tim Hartrick
- Re: [advanced API] how to get the destinati... Jun-ichiro itojun Hagino
- Re: [advanced API] how to get the dest... Erik Nordmark
- Re: [advanced API] how to get the destinati... Jun-ichiro itojun Hagino
- Re: [advanced API] how to get the destinati... Francis Dupont
- Re: [advanced API] how to get the destinati... Francis Dupont
- Re: [advanced API] how to get the dest... Erik Nordmark
- Re: [advanced API] how to get the destinati... itojun
- Re: [advanced API] how to get the destinati... Francis Dupont
- Re: [advanced API] how to get the destinati... Francis Dupont
- Re: [advanced API] how to get the dest... Jun-ichiro itojun Hagino
