Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
32c0c014
Commit
32c0c014
authored
Feb 21, 2003
by
Bruce Allan
Committed by
Linus Torvalds
Feb 21, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SCTP/IPV6]: Move sockaddr storage and in6addr_{any,loopback} to generic places.
parent
132325b4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
32 deletions
+28
-32
include/linux/in6.h
include/linux/in6.h
+9
-0
include/linux/socket.h
include/linux/socket.h
+15
-0
include/net/sctp/structs.h
include/net/sctp/structs.h
+0
-32
net/ipv6/addrconf.c
net/ipv6/addrconf.c
+4
-0
No files found.
include/linux/in6.h
View file @
32c0c014
...
...
@@ -40,6 +40,15 @@ struct in6_addr
#define s6_addr32 in6_u.u6_addr32
};
/* IPv6 Wildcard Address (::) and Loopback Address (::1) defined in RFC2553
* NOTE: Be aware the IN6ADDR_* constants and in6addr_* externals are defined
* in network byte order, not in host byte order as are the IPv4 equivalents
*/
extern
const
struct
in6_addr
in6addr_any
;
#define IN6ADDR_ANY_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } }
extern
const
struct
in6_addr
in6addr_loopback
;
#define IN6ADDR_LOOPBACK_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } }
struct
sockaddr_in6
{
unsigned
short
int
sin6_family
;
/* AF_INET6 */
__u16
sin6_port
;
/* Transport layer port # */
...
...
include/linux/socket.h
View file @
32c0c014
...
...
@@ -24,6 +24,21 @@ struct linger {
int
l_linger
;
/* How long to linger for */
};
/*
* 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
...
...
include/net/sctp/structs.h
View file @
32c0c014
...
...
@@ -61,38 +61,6 @@
#include <linux/workqueue.h>
/* We need tq_struct. */
#include <linux/sctp.h>
/* We need sctp* header structs. */
/*
* This is (almost) a direct quote from RFC 2553.
*/
/*
* Desired design of maximum size and alignment
*/
#define _SS_MAXSIZE 128
/* Implementation specific max size */
#define _SS_ALIGNSIZE (sizeof (__s64))
/* Implementation specific desired alignment */
/*
* Definitions used for sockaddr_storage structure paddings design.
*/
#define _SS_PAD1SIZE (_SS_ALIGNSIZE - sizeof (sa_family_t))
#define _SS_PAD2SIZE (_SS_MAXSIZE - (sizeof (sa_family_t)+ \
_SS_PAD1SIZE + _SS_ALIGNSIZE))
struct
sockaddr_storage
{
sa_family_t
__ss_family
;
/* address family */
/* Following fields are implementation specific */
char
__ss_pad1
[
_SS_PAD1SIZE
];
/* 6 byte pad, to make implementation */
/* specific pad up to alignment field that */
/* follows explicit in the data structure */
__s64
__ss_align
;
/* field to force desired structure */
/* storage alignment */
char
__ss_pad2
[
_SS_PAD2SIZE
];
/* 112 byte pad to achieve desired size, */
/* _SS_MAXSIZE value minus size of ss_family */
/* __ss_pad1, __ss_align fields is 112 */
};
/* A convenience structure for handling sockaddr structures.
* We should wean ourselves off this.
*/
...
...
net/ipv6/addrconf.c
View file @
32c0c014
...
...
@@ -136,6 +136,10 @@ static struct ipv6_devconf ipv6_devconf_dflt =
MAX_RTR_SOLICITATION_DELAY
,
/* rtr solicit delay */
};
/* IPv6 Wildcard Address and Loopback Address defined by RFC2553 */
const
struct
in6_addr
in6addr_any
=
IN6ADDR_ANY_INIT
;
const
struct
in6_addr
in6addr_loopback
=
IN6ADDR_LOOPBACK_INIT
;
int
ipv6_addr_type
(
struct
in6_addr
*
addr
)
{
u32
st
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment