Lines Matching refs:iph
77 static inline int IP_ECN_set_ce(struct iphdr *iph) in IP_ECN_set_ce() argument
79 u32 ecn = (iph->tos + 1) & INET_ECN_MASK; in IP_ECN_set_ce()
100 iph->check = csum16_add(iph->check, check_add); in IP_ECN_set_ce()
101 iph->tos |= INET_ECN_CE; in IP_ECN_set_ce()
105 static inline int IP_ECN_set_ect1(struct iphdr *iph) in IP_ECN_set_ect1() argument
107 if ((iph->tos & INET_ECN_MASK) != INET_ECN_ECT_0) in IP_ECN_set_ect1()
110 iph->check = csum16_add(iph->check, htons(0x1)); in IP_ECN_set_ect1()
111 iph->tos ^= INET_ECN_MASK; in IP_ECN_set_ect1()
115 static inline void IP_ECN_clear(struct iphdr *iph) in IP_ECN_clear() argument
117 iph->tos &= ~INET_ECN_MASK; in IP_ECN_clear()
134 static inline int IP6_ECN_set_ce(struct sk_buff *skb, struct ipv6hdr *iph) in IP6_ECN_set_ce() argument
138 if (INET_ECN_is_not_ect(ipv6_get_dsfield(iph))) in IP6_ECN_set_ce()
141 from = *(__be32 *)iph; in IP6_ECN_set_ce()
143 *(__be32 *)iph = to; in IP6_ECN_set_ce()
150 static inline int IP6_ECN_set_ect1(struct sk_buff *skb, struct ipv6hdr *iph) in IP6_ECN_set_ect1() argument
154 if ((ipv6_get_dsfield(iph) & INET_ECN_MASK) != INET_ECN_ECT_0) in IP6_ECN_set_ect1()
157 from = *(__be32 *)iph; in IP6_ECN_set_ect1()
159 *(__be32 *)iph = to; in IP6_ECN_set_ect1()