-#ifndef _GPXE_INTERFACE_H
-#define _GPXE_INTERFACE_H
+#ifndef _GPXE_TCPIP_H
+#define _GPXE_TCPIP_H
/** @file
*
const void *data, size_t len );
extern unsigned int tcpip_chksum ( const void *data, size_t len );
-extern struct tcpip_protocol * find_tcpip_protocol ( uint8_t trans_proto );
-extern struct tcpip_net_protocol * find_tcpip_net_protocol ( sa_family_t sa_family );
-
-#endif /* _GPXE_INTERFACE_H */
+#endif /* _GPXE_TCPIP_H */
static struct tcpip_net_protocol tcpip_net_protocols[0] __table_start ( tcpip_net_protocols );
static struct tcpip_net_protocol tcpip_net_protocols_end[0] __table_end ( tcpip_net_protocols );
-struct tcpip_protocol;
-
/** Registered transport-layer protocols that support TCPIP */
static struct tcpip_protocol tcpip_protocols[0] __table_start ( tcpip_protocols );
static struct tcpip_protocol tcpip_protocols_end[0] __table_end ( tcpip_protocols );
-/** Identify TCPIP network-layer protocol
- *
- * @v sa_family Network address family
- * @ret tcpip Protocol supporting TCPIP, or NULL
- */
-static struct tcpip_net_protocol * tcpip_find_protocol ( sa_family_t sa_family ) {
- struct tcpip_net_protocol *tcpip_net;
-
- for ( tcpip_net = tcpip_net_protocols;
- tcpip_net < tcpip_net_protocols_end; ++tcpip_net ) {
- if ( tcpip_net->sa_family == sa_family ) {
- return tcpip_net;
- }
- }
- return NULL;
-}
-
-/** Identify TCPIP transport-layer protocol
- *
- * @v trans_proto Transport-layer protocol number, IP_XXX
- * @ret tcpip_protocol Transport-layer protocol, or NULL
- */
-struct tcpip_protocol* find_tcpip_protocol ( uint8_t trans_proto ) {
- struct tcpip_protocol *tcpip;
-
- for ( tcpip = tcpip_protocols; tcpip <= tcpip_protocols_end;
- ++tcpip ) {
- if ( tcpip->trans_proto == trans_proto ) {
- return tcpip;
- }
- }
- return NULL;
-}
-
/** Process a received packet
*
* @v pkb Packet buffer