Lines Matching defs:offset
71 inet6_opt_append(void *extbuf, socklen_t extlen, int offset, uint8_t type,
94 remainder = (offset + 2 + len) % align;
101 endlen = offset + padbytes + 2 + len;
110 p = (uint8_t *)extbuf + offset;
143 inet6_opt_finish(void *extbuf, socklen_t extlen, int offset)
158 padbytes = 8 - (offset % 8);
162 if ((offset + padbytes > extlen) || !extbuf) {
166 return (offset + padbytes);
170 p = (uint8_t *)extbuf + offset;
189 return (offset + padbytes);
197 inet6_opt_set_val(void *databuf, int offset, void *val, socklen_t vallen)
199 memcpy((uint8_t *)databuf + offset, val, vallen);
200 return (offset + vallen);
204 * Section 10.5 RFC 3542. Starting walking the option header offset into the
206 * and pass it back in as offset to iterate. -1 is returned on error.
212 inet6_opt_next(void *extbuf, socklen_t extlen, int offset, uint8_t *typep,
226 if (offset == 0) {
227 offset = 2;
231 p = (uint8_t *)extbuf + offset;
265 * Section 10.6 RFC 3542. Starting walking the option header offset into the
267 * and pass it back in as offset to iterate. -1 is returned on error.
273 inet6_opt_find(void *extbuf, socklen_t extlen, int offset, uint8_t type,
279 offset = inet6_opt_next(extbuf, extlen, offset, &newtype, lenp,
282 if (offset == -1)
286 /* value to feed back into inet6_opt_find() as offset */
287 return (offset);
296 inet6_opt_get_val(void *databuf, int offset, void *val, socklen_t vallen)
298 memcpy(val, (uint8_t *)databuf + offset, vallen);
299 return (offset + vallen);