mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-08-09 09:03:49 +08:00
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:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user