Lines Matching refs:IPOPT_OFFSET
160 if (optlen < IPOPT_OFFSET + sizeof(*cp)) { in ip_dooptions()
164 if ((off = cp[IPOPT_OFFSET]) < IPOPT_MINOFF) { in ip_dooptions()
165 code = &cp[IPOPT_OFFSET] - (u_char *)ip; in ip_dooptions()
264 cp[IPOPT_OFFSET] += sizeof(struct in_addr); in ip_dooptions()
276 if (optlen < IPOPT_OFFSET + sizeof(*cp)) { in ip_dooptions()
277 code = &cp[IPOPT_OFFSET] - (u_char *)ip; in ip_dooptions()
280 if ((off = cp[IPOPT_OFFSET]) < IPOPT_MINOFF) { in ip_dooptions()
281 code = &cp[IPOPT_OFFSET] - (u_char *)ip; in ip_dooptions()
309 cp[IPOPT_OFFSET] += sizeof(struct in_addr); in ip_dooptions()
322 if ((off = cp[IPOPT_OFFSET]) < 5) { in ip_dooptions()
327 cp[IPOPT_OFFSET + 1] += (1 << 4); in ip_dooptions()
328 if ((cp[IPOPT_OFFSET + 1] & 0xf0) == 0) { in ip_dooptions()
329 code = &cp[IPOPT_OFFSET] - (u_char *)ip; in ip_dooptions()
336 switch (cp[IPOPT_OFFSET + 1] & 0x0f) { in ip_dooptions()
343 code = &cp[IPOPT_OFFSET] - (u_char *)ip; in ip_dooptions()
353 cp[IPOPT_OFFSET] += sizeof(struct in_addr); in ip_dooptions()
360 code = &cp[IPOPT_OFFSET] - (u_char *)ip; in ip_dooptions()
367 cp[IPOPT_OFFSET] += sizeof(struct in_addr); in ip_dooptions()
372 code = &cp[IPOPT_OFFSET + 1] - (u_char *)ip; in ip_dooptions()
377 cp[IPOPT_OFFSET] += sizeof(uint32_t); in ip_dooptions()
412 opts->ip_nhops = (olen - IPOPT_OFFSET - 1) / sizeof(struct in_addr); in save_rte()
455 opts->ip_srcrt.srcopt[IPOPT_OFFSET] = IPOPT_MINOFF; in ip_srcroute()
678 bcopy((caddr_t)&cp[IPOPT_OFFSET+1], mtod(m, caddr_t), in ip_pcbopts()
684 bcopy((&cp[IPOPT_OFFSET+1] + sizeof(struct in_addr)), in ip_pcbopts()
685 &cp[IPOPT_OFFSET+1], in ip_pcbopts()
746 if (optlen != IPOPT_OFFSET + sizeof(uint16_t) || in ip_checkrouteralert()
747 (*((uint16_t *)&cp[IPOPT_OFFSET]) != 0)) in ip_checkrouteralert()