aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2014-03-04 13:10:07 +0000
committerMichael Brown <mcb30@ipxe.org>2014-03-04 13:13:54 +0000
commit6414b5ca036ade7545eb0c309c66731fced6e055 (patch)
treedd73109b6fbbff5e176b87c30df744665595cafb /src/include
parentdb67de6f31a062dc1995d4561be83cd51609d6c4 (diff)
downloadipxe-6414b5ca036ade7545eb0c309c66731fced6e055.zip
ipxe-6414b5ca036ade7545eb0c309c66731fced6e055.tar.gz
ipxe-6414b5ca036ade7545eb0c309c66731fced6e055.tar.bz2
[tcpip] Provide tcpip_mtu() to determine the maximum transmission unit
Provide the function tcpip_mtu() to allow external code to determine the (transport-layer) maximum transmission unit for a given socket address. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/ipxe/tcpip.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/include/ipxe/tcpip.h b/src/include/ipxe/tcpip.h
index d28689a..200630d 100644
--- a/src/include/ipxe/tcpip.h
+++ b/src/include/ipxe/tcpip.h
@@ -97,6 +97,8 @@ struct tcpip_net_protocol {
const char *name;
/** Network address family */
sa_family_t sa_family;
+ /** Fixed header length */
+ size_t header_len;
/**
* Transmit packet
*
@@ -148,6 +150,7 @@ extern int tcpip_tx ( struct io_buffer *iobuf, struct tcpip_protocol *tcpip,
struct net_device *netdev,
uint16_t *trans_csum );
extern struct net_device * tcpip_netdev ( struct sockaddr_tcpip *st_dest );
+extern size_t tcpip_mtu ( struct sockaddr_tcpip *st_dest );
extern uint16_t generic_tcpip_continue_chksum ( uint16_t partial,
const void *data, size_t len );
extern uint16_t tcpip_chksum ( const void *data, size_t len );