david/ipxe
Archived
1
0
This repository has been archived on 2020-12-06. You can view files and clone it, but cannot push or open issues or pull requests.
ipxe/src/include/proto.h
Michael Brown 824d6ffa7f 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.
2006-04-24 15:42:49 +00:00

34 lines
794 B
C

#ifndef PROTO_H
#define PROTO_H
#include <gpxe/tables.h>
#include "buffer.h"
#include <gpxe/in.h>
struct protocol {
char *name;
in_port_t default_port;
int ( * load ) ( char *url, struct sockaddr_in *server, char *file,
struct buffer *buffer );
};
/*
* Protocols that should be used if no explicit protocol is specified
* (i.e. tftp) should use __default_protocol; all other protocols
* should use __protocol.
*
*/
#define __protocol_start __table_start(protocol)
#define __protocol __table(protocol,01)
#define __default_protocol_start __table(protocol,02)
#define __default_protocol __table(protocol,03)
#define __protocol_end __table_end(protocol)
/*
* Functions in proto.c
*
*/
extern struct protocol * identify_protocol ( const char *name );
#endif /* PROTO_H */