2
0
mirror of https://github.com/xcat2/xNBA.git synced 2024-12-14 23:31:39 +00:00
xNBA/src/include/proto.h
Michael Brown 467e9627cc Added features that will be required for PXE UDP support.
Introduced struct sockaddr_tcpip, to simplify code that deals with
both IPv4 and IPv6 addresses.

Reorganised parts of tcpip.c and udp.c.
2006-08-02 00:02:21 +00:00

34 lines
793 B
C

#ifndef PROTO_H
#define PROTO_H
#include <gpxe/tables.h>
#include "buffer.h"
#include <gpxe/in.h>
struct protocol {
char *name;
uint16_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 */