|
@@ -14,6 +14,9 @@
|
14
|
14
|
/** A socket address family */
|
15
|
15
|
typedef uint16_t sa_family_t;
|
16
|
16
|
|
|
17
|
+/** Length of a @c struct @c sockaddr */
|
|
18
|
+#define SA_LEN 32
|
|
19
|
+
|
17
|
20
|
/**
|
18
|
21
|
* Generalized socket address structure
|
19
|
22
|
*
|
|
@@ -26,6 +29,13 @@ struct sockaddr {
|
26
|
29
|
* This is an AF_XXX constant.
|
27
|
30
|
*/
|
28
|
31
|
sa_family_t sa_family;
|
|
32
|
+ /** Padding
|
|
33
|
+ *
|
|
34
|
+ * This ensures that a struct @c sockaddr_tcpip is large
|
|
35
|
+ * enough to hold a socket address for any TCP/IP address
|
|
36
|
+ * family.
|
|
37
|
+ */
|
|
38
|
+ char pad[ SA_LEN - sizeof ( sa_family_t ) ];
|
29
|
39
|
};
|
30
|
40
|
|
31
|
41
|
#endif /* _GPXE_SOCKET_H */
|