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