Lines Matching refs:IPOPT_OFFSET
161 if (optlen < IPOPT_OFFSET + sizeof(*cp)) { in ip_dooptions()
165 if ((off = cp[IPOPT_OFFSET]) < IPOPT_MINOFF) { in ip_dooptions()
166 code = &cp[IPOPT_OFFSET] - (u_char *)ip; in ip_dooptions()
265 cp[IPOPT_OFFSET] += sizeof(struct in_addr); in ip_dooptions()
277 if (optlen < IPOPT_OFFSET + sizeof(*cp)) { in ip_dooptions()
278 code = &cp[IPOPT_OFFSET] - (u_char *)ip; in ip_dooptions()
281 if ((off = cp[IPOPT_OFFSET]) < IPOPT_MINOFF) { in ip_dooptions()
282 code = &cp[IPOPT_OFFSET] - (u_char *)ip; in ip_dooptions()
310 cp[IPOPT_OFFSET] += sizeof(struct in_addr); in ip_dooptions()
323 if ((off = cp[IPOPT_OFFSET]) < 5) { in ip_dooptions()
328 cp[IPOPT_OFFSET + 1] += (1 << 4); in ip_dooptions()
329 if ((cp[IPOPT_OFFSET + 1] & 0xf0) == 0) { in ip_dooptions()
330 code = &cp[IPOPT_OFFSET] - (u_char *)ip; in ip_dooptions()
337 switch (cp[IPOPT_OFFSET + 1] & 0x0f) { in ip_dooptions()
344 code = &cp[IPOPT_OFFSET] - (u_char *)ip; in ip_dooptions()
354 cp[IPOPT_OFFSET] += sizeof(struct in_addr); in ip_dooptions()
361 code = &cp[IPOPT_OFFSET] - (u_char *)ip; in ip_dooptions()
368 cp[IPOPT_OFFSET] += sizeof(struct in_addr); in ip_dooptions()
373 code = &cp[IPOPT_OFFSET + 1] - (u_char *)ip; in ip_dooptions()
378 cp[IPOPT_OFFSET] += sizeof(uint32_t); in ip_dooptions()
413 opts->ip_nhops = (olen - IPOPT_OFFSET - 1) / sizeof(struct in_addr); in save_rte()
456 opts->ip_srcrt.srcopt[IPOPT_OFFSET] = IPOPT_MINOFF; in ip_srcroute()
677 bcopy((caddr_t)&cp[IPOPT_OFFSET+1], mtod(m, caddr_t), in ip_pcbopts()
683 bcopy((&cp[IPOPT_OFFSET+1] + sizeof(struct in_addr)), in ip_pcbopts()
684 &cp[IPOPT_OFFSET+1], in ip_pcbopts()
745 if (optlen != IPOPT_OFFSET + sizeof(uint16_t) || in ip_checkrouteralert()
746 (*((uint16_t *)&cp[IPOPT_OFFSET]) != 0)) in ip_checkrouteralert()