struct ip_hdr: split u16_t _ttl_proto to u8_t _ttl and u8_t _proto to prevent unnecessary loading and htons

This commit is contained in:
goldsimon
2010-02-14 11:42:08 +00:00
parent c858aa5686
commit 838c35acf6
2 changed files with 10 additions and 8 deletions

View File

@@ -555,7 +555,8 @@ err_t ip_output_if_opt(struct pbuf *p, ip_addr_t *src, ip_addr_t *dest,
LWIP_ASSERT("check that first pbuf can hold struct ip_hdr",
(p->len >= sizeof(struct ip_hdr)));
IPH_TTL_PROTO_SET(iphdr, ttl, proto);
IPH_TTL_SET(iphdr, ttl);
IPH_PROTO_SET(iphdr, proto);
ip_addr_set(&(iphdr->dest), dest);