You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

proto.h 901B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef PROTO_H
  2. #define PROTO_H
  3. #include <gpxe/tables.h>
  4. #include <gpxe/buffer.h>
  5. #include <gpxe/in.h>
  6. struct protocol {
  7. char *name;
  8. uint16_t default_port;
  9. int ( * load ) ( char *url, struct sockaddr_in *server, char *file,
  10. struct buffer *buffer );
  11. };
  12. /*
  13. * Protocols that should be used if no explicit protocol is specified
  14. * (i.e. tftp) should use __default_protocol; all other protocols
  15. * should use __protocol.
  16. *
  17. */
  18. #define __protocol_start __table_start ( struct protocol, protocol )
  19. #define __protocol __table ( struct protocol, protocol, 01 )
  20. #define __default_protocol_start __table ( struct protocol, protocol, 02 )
  21. #define __default_protocol __table ( struct protocol, protocol, 03 )
  22. #define __protocol_end __table_end ( struct protocol, protocol )
  23. /*
  24. * Functions in proto.c
  25. *
  26. */
  27. extern struct protocol * identify_protocol ( const char *name );
  28. #endif /* PROTO_H */