diff options
| author | Bruce Allan <bwa@us.ibm.com> | 2003-02-21 07:42:14 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2003-02-21 07:42:14 -0800 |
| commit | 32c0c014580b09cbdd7b334bbe994401d41dece2 (patch) | |
| tree | 0a56710a111c5dddd15658bb4c8464812253724a /include/linux/socket.h | |
| parent | 132325b4385fb12490a65488da3ceba681a7b430 (diff) | |
[SCTP/IPV6]: Move sockaddr storage and in6addr_{any,loopback} to generic places.
Diffstat (limited to 'include/linux/socket.h')
| -rw-r--r-- | include/linux/socket.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/socket.h b/include/linux/socket.h index f8e90303576d..9352f72c5988 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h @@ -25,6 +25,21 @@ struct linger { }; /* + * Desired design of maximum size and alignment (see RFC2553) + */ +#define _SS_MAXSIZE 128 /* Implementation specific max size */ +#define _SS_ALIGNSIZE (__alignof__ (struct sockaddr *)) + /* Implementation specific desired alignment */ + +struct sockaddr_storage { + sa_family_t ss_family; /* address family */ + /* Following field(s) are implementation specific */ + char __data[_SS_MAXSIZE - sizeof(sa_family_t)]; + /* space to achieve desired size, */ + /* _SS_MAXSIZE value minus size of ss_family */ +} __attribute__ ((aligned(_SS_ALIGNSIZE))); /* force desired alignment */ + +/* * As we do 4.4BSD message passing we use a 4.4BSD message passing * system, not 4.3. Thus msg_accrights(len) are now missing. They * belong in an obscure libc emulation or the bin. |
