mirror of
https://github.com/ipxe/ipxe
synced 2026-01-01 00:07:27 +03:00
Header rearrangement.
I want to get to the point where any header in include/ reflects a standard user-level header (e.g. a POSIX header), while everything that's specific to gPXE lives in include/gpxe/. Headers that reflect a Linux header (e.g. if_ether.h) should also be in include/gpxe/, with the same name as the Linux header and, preferably, the same names used for the definitions.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#ifndef _IN_H
|
||||
#define _IN_H
|
||||
#ifndef _GPXE_IN_H
|
||||
#define _GPXE_IN_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
@@ -8,8 +8,11 @@
|
||||
#define IP_TCP 6
|
||||
#define IP_UDP 17
|
||||
|
||||
/* Same after going through htonl */
|
||||
#define IP_BROADCAST 0xFFFFFFFF
|
||||
#define INADDR_NONE 0xffffffff
|
||||
|
||||
#define INADDR_BROADCAST 0xffffffff
|
||||
|
||||
#define IN_MULTICAST(addr) ( ( (addr) & 0xf0000000 ) == 0xe0000000 )
|
||||
|
||||
struct in_addr {
|
||||
uint32_t s_addr;
|
||||
@@ -27,4 +30,4 @@ struct sockaddr_in {
|
||||
extern int inet_aton ( const char *cp, struct in_addr *inp );
|
||||
extern char * inet_ntoa ( struct in_addr in );
|
||||
|
||||
#endif /* _IN_H */
|
||||
#endif /* _GPXE_IN_H */
|
||||
|
||||
Reference in New Issue
Block a user