summaryrefslogtreecommitdiffstats
path: root/src/net/ipv4.c
diff options
context:
space:
mode:
authorMichael Brown2014-03-04 14:10:07 +0100
committerMichael Brown2014-03-04 14:13:54 +0100
commit6414b5ca036ade7545eb0c309c66731fced6e055 (patch)
treedd73109b6fbbff5e176b87c30df744665595cafb /src/net/ipv4.c
parent[tcpip] Provide tcpip_netdev() to determine the transmitting network device (diff)
downloadipxe-6414b5ca036ade7545eb0c309c66731fced6e055.tar.gz
ipxe-6414b5ca036ade7545eb0c309c66731fced6e055.tar.xz
ipxe-6414b5ca036ade7545eb0c309c66731fced6e055.zip
[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/net/ipv4.c')
-rw-r--r--src/net/ipv4.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/net/ipv4.c b/src/net/ipv4.c
index 8bda5c86..c5cfd134 100644
--- a/src/net/ipv4.c
+++ b/src/net/ipv4.c
@@ -621,6 +621,7 @@ struct net_protocol ipv4_protocol __net_protocol = {
struct tcpip_net_protocol ipv4_tcpip_protocol __tcpip_net_protocol = {
.name = "IPv4",
.sa_family = AF_INET,
+ .header_len = sizeof ( struct iphdr ),
.tx = ipv4_tx,
.netdev = ipv4_netdev,
};