summaryrefslogtreecommitdiff
path: root/sys/arch/i386/netboot/packet.h
blob: 744809653693183e46837786ea9b345b8eb47958 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/*	$NetBSD: packet.h,v 1.3 1994/10/27 04:21:22 cgd Exp $	*/

/*
 * source in this file came from
 * the Mach ethernet boot written by Leendert van Doorn.
 *
 * Packet layout definitions
 */

/* implementation constants */
#define	PKT_POOLSIZE	5
#define	PKT_DATASIZE	1514

/*
 * Structure of a packet.
 * Each packet can hold exactly one ethernet message.
 */
typedef struct {
  u_short pkt_used;			/* whether this packet it used */
  u_short pkt_len;			/* length of data  */
  u_char *pkt_offset;			/* current offset in data */
  u_char pkt_data[PKT_DATASIZE];	/* packet data */
} packet_t;

void PktInit(void);
packet_t *PktAlloc(u_long);
void PktRelease(packet_t *);