YOSHIFUJI Hideaki <[EMAIL PROTECTED]> wrote: > This sockaddr_rxrpc{} should NOT include sockaddr_in{} directly. > Please use sockaddr_storage{} (or sockaddr{}, maybe), and make it > sure to align on 64-bit word.
How about this then: struct sockaddr_rxrpc { sa_family_t srx_family; /* address family */ u16 srx_service; /* service desired */ u16 transport_type; /* type of transport socket (SOCK_DGRAM) */ u16 transport_len; /* length of transport address */ struct sockaddr srx_sa[0]; /* address of transport endpoint */ }; Then whoever wants to use it must follow it immediately with an address of the appropriate type. The length given to connect or bind would then be the combined length of the two addresses. Someone could then set one up on the stack by this sort of thing: int zebra(int fd) { struct { struct sockaddr_rxrpc srx; struct sockaddr_in sin; } sa; ... if (connect(fd, (struct sockaddr *) &sa, sizeof(sa)) < 0) ... ... } David - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html