Lines Matching defs:iph
91 static inline int IP_ECN_set_ce(struct iphdr *iph)
93 u32 ecn = (iph->tos + 1) & INET_ECN_MASK;
114 iph->check = csum16_add(iph->check, check_add);
115 iph->tos |= INET_ECN_CE;
119 static inline int IP_ECN_set_ect1(struct iphdr *iph)
121 if ((iph->tos & INET_ECN_MASK) != INET_ECN_ECT_0)
124 iph->check = csum16_add(iph->check, htons(0x1));
125 iph->tos ^= INET_ECN_MASK;
129 static inline void IP_ECN_clear(struct iphdr *iph)
131 iph->tos &= ~INET_ECN_MASK;
148 static inline int IP6_ECN_set_ce(struct sk_buff *skb, struct ipv6hdr *iph)
152 if (INET_ECN_is_not_ect(ipv6_get_dsfield(iph)))
155 from = *(__be32 *)iph;
157 *(__be32 *)iph = to;
164 static inline int IP6_ECN_set_ect1(struct sk_buff *skb, struct ipv6hdr *iph)
168 if ((ipv6_get_dsfield(iph) & INET_ECN_MASK) != INET_ECN_ECT_0)
171 from = *(__be32 *)iph;
173 *(__be32 *)iph = to;