search for: udp_hdr

Displaying 6 results from an estimated 6 matches for "udp_hdr".

2004 Sep 06
0
example/dsmark+policing => tcsim outputs are different
...--- >>> ---------- start of dsmark+policing.tcsim file: ---------- /* * dsmark+policing - Dsmark with tcindex and policing * * Packets with non-zero TOS/DS field are marked with TOS 0xb8 (EF DSCP). * If they exceed the rate limit, they''re dropped. */ #define TOS_ZERO UDP_HDR($ip_tos=0) #define TOS_NONZERO UDP_HDR($ip_tos=1) #define PAYLOAD 0 x 980 /* 1000-sizeof(iphdr) = 980 bytes */ dev eth0 10000 { /* 10 Mbps */ #include "dsmark+policing.tc" } every 0.005s send TOS_ZERO PAYLOAD /* 1.6 Mbps */ every 0.005s send TOS_NONZERO PAYLOAD /* 1.6 Mbps */ time...
2010 Jun 28
3
[PATCHv2] vhost-net: add dhclient work-around from userspace
...older userspace does not use it. + * One important user of recvmsg with AF_PACKET is dhclient, + * so we add a work-around just for DHCP. */ + if (skb->ip_summed == CHECKSUM_PARTIAL && + skb_headlen(skb) >= skb_transport_offset(skb) + + sizeof(struct udphdr) && + udp_hdr(skb)->dest == htons(68) && + skb_network_header_len(skb) >= sizeof(struct iphdr) && + ip_hdr(skb)->protocol == IPPROTO_UDP && + skb->protocol == htons(ETH_P_IP)) { + skb_checksum_help(skb); + /* Restore ip_summed value: tun passes it to user. */ +...
2010 Jun 28
3
[PATCHv2] vhost-net: add dhclient work-around from userspace
...older userspace does not use it. + * One important user of recvmsg with AF_PACKET is dhclient, + * so we add a work-around just for DHCP. */ + if (skb->ip_summed == CHECKSUM_PARTIAL && + skb_headlen(skb) >= skb_transport_offset(skb) + + sizeof(struct udphdr) && + udp_hdr(skb)->dest == htons(68) && + skb_network_header_len(skb) >= sizeof(struct iphdr) && + ip_hdr(skb)->protocol == IPPROTO_UDP && + skb->protocol == htons(ETH_P_IP)) { + skb_checksum_help(skb); + /* Restore ip_summed value: tun passes it to user. */ +...
2010 Jun 27
0
[PATCH RFC] vhost-net: add dhclient work-around from userspace
...RTIAL && + skb->protocol == htons(ETH_P_IP) && + skb_network_header_len(skb) >= sizeof(struct iphdr) && + ip_hdr(skb)->protocol == IPPRODO_UDP && + skb_headlen(skb) >= skb_transport_offset(skb) + sizeof(struct udphdr) && + udp_hdr(skb)->source == htons(0x67)) { + skb_checksum_help(skb); + /* Restore ip_summed value: tun passes it to user. */ + skb->ip_summed = CHECKSUM_PARTIAL; + } + } else { + ret = 0; + } + release_sock(sk); + return len; +} + /* Expects to be always run from workqueue - which acts as * re...
2010 Jun 27
0
[PATCH RFC] vhost-net: add dhclient work-around from userspace
...RTIAL && + skb->protocol == htons(ETH_P_IP) && + skb_network_header_len(skb) >= sizeof(struct iphdr) && + ip_hdr(skb)->protocol == IPPRODO_UDP && + skb_headlen(skb) >= skb_transport_offset(skb) + sizeof(struct udphdr) && + udp_hdr(skb)->source == htons(0x67)) { + skb_checksum_help(skb); + /* Restore ip_summed value: tun passes it to user. */ + skb->ip_summed = CHECKSUM_PARTIAL; + } + } else { + ret = 0; + } + release_sock(sk); + return len; +} + /* Expects to be always run from workqueue - which acts as * re...
2012 May 22
0
[klibc:master] ipconfig: Write $DOMAINSEARCH as domain-search
...100644 --- a/usr/kinit/ipconfig/bootp_packet.h +++ b/usr/kinit/ipconfig/bootp_packet.h @@ -28,4 +28,14 @@ struct bootp_hdr { /* 312 bytes of extensions */ }; +/* + * memory size of BOOTP Vendor Extensions/DHCP Options for receiving + * + * generic_ether_mtu:1500, min_sizeof(ip_hdr):20, sizeof(udp_hdr):8 + * + * #define BOOTP_EXTS_SIZE (1500 - 20 - 8 - sizeof(struct bootp_hdr)) + */ +/* larger size for backward compatibility of ipconfig */ +#define BOOTP_EXTS_SIZE 1500 + #endif /* BOOTP_PACKET_H */ diff --git a/usr/kinit/ipconfig/bootp_proto.c b/usr/kinit/ipconfig/bootp_proto.c index e3d50e3..1...