diff options
| author | Michael Brown | 2005-04-29 15:17:25 +0200 |
|---|---|---|
| committer | Michael Brown | 2005-04-29 15:17:25 +0200 |
| commit | e4131ebb8469222f9bf864cba516e78b2530ffb3 (patch) | |
| tree | a0e1d153137da9b70d6e8a68cb77a7787da400aa /src/include | |
| parent | First version (diff) | |
| download | ipxe-e4131ebb8469222f9bf864cba516e78b2530ffb3.tar.gz ipxe-e4131ebb8469222f9bf864cba516e78b2530ffb3.tar.xz ipxe-e4131ebb8469222f9bf864cba516e78b2530ffb3.zip | |
First version
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/proto.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/include/proto.h b/src/include/proto.h new file mode 100644 index 000000000..5ca56ce48 --- /dev/null +++ b/src/include/proto.h @@ -0,0 +1,33 @@ +#ifndef PROTO_H +#define PROTO_H + +#include "tables.h" + +struct protocol { + char *name; + int ( * load ) ( const char *name, + int ( * process ) ( unsigned char *data, + unsigned int blocknum, + unsigned int len, + int eof ) ); +}; + +/* + * 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 */ |
