david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

First version

This commit is contained in:
Michael Brown 2006-04-18 17:49:51 +00:00
parent 0864a73347
commit 42b659f926
1 changed files with 56 additions and 0 deletions

56
src/include/gpxe/llh.h Normal file
View File

@ -0,0 +1,56 @@
#ifndef _LLH_H
#define _LLH_H
/** @file
*
* Link-layer headers
*
* This file defines a media-independent link-layer header, used for
* communication between the network and link layers of the stack.
*
*/
#include <stdint.h>
/** Maximum length of a link-layer address */
#define MAX_LLH_ADDR_LEN 6
/** Maximum length of a network-layer address */
#define MAX_NET_ADDR_LEN 4
/** A media-independent link-layer header
*
* This structure represents a generic link-layer header. It never
* appears on the wire, but is used to communicate between different
* layers within the gPXE protocol stack.
*/
struct gpxehdr {
/** The network-layer protocol
*
* This is the network-layer protocol expressed as an
* ETH_P_XXX constant, in network-byte order.
*/
uint16_t net_proto;
/** Broadcast flag
*
* Filled in only on outgoing packets.
*/
int broadcast : 1;
/** Multicast flag
*
* Filled in only on outgoing packets.
*/
int multicast : 1;
/** Network-layer address length
*
* Filled in only on outgoing packets.
*/
uint8_t net_addr_len;
/** Network-layer address
*
* Filled in only on outgoing packets.
*/
uint8_t net_addr[MAX_NET_ADDR_LEN];
} __attribute__ (( packed ));
#endif /* _LLH_H */