MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ip6_ecn_egress

Function ip6_ecn_egress

freebsd/netinet/ip_ecn.c:176–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174}
175
176int
177ip6_ecn_egress(int mode, const u_int32_t *outer, u_int32_t *inner)
178{
179 u_int8_t outer8, inner8, oinner8;
180
181 if (!outer || !inner)
182 panic("NULL pointer passed to ip6_ecn_egress");
183
184 outer8 = (ntohl(*outer) >> 20) & 0xff;
185 inner8 = oinner8 = (ntohl(*inner) >> 20) & 0xff;
186 if (ip_ecn_egress(mode, &outer8, &inner8) == 0)
187 return (0);
188 if (inner8 != oinner8) {
189 *inner &= ~htonl(0xff << 20);
190 *inner |= htonl((u_int32_t)inner8 << 20);
191 }
192 return (1);
193}
194#endif

Callers 1

gif_inputFunction · 0.85

Calls 2

ip_ecn_egressFunction · 0.85
panicFunction · 0.50

Tested by

no test coverage detected