david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

Remove unused functions.

This commit is contained in:
Michael Brown 2006-08-01 14:26:02 +00:00
parent 1ebb68e49a
commit beadd82208
2 changed files with 3 additions and 42 deletions

View File

@ -1,5 +1,5 @@
#ifndef _GPXE_INTERFACE_H
#define _GPXE_INTERFACE_H
#ifndef _GPXE_TCPIP_H
#define _GPXE_TCPIP_H
/** @file
*
@ -87,7 +87,4 @@ extern unsigned int tcpip_continue_chksum ( unsigned int partial,
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 */

View File

@ -21,46 +21,10 @@
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