Lines Matching refs:extbuf

43 #define	bufpos(p) ((p) - (uint8_t *)extbuf)
51 inet6_opt_init(void *extbuf, socklen_t extlen) in inet6_opt_init() argument
53 if (extbuf && ((extlen < 0) || (extlen % 8))) { in inet6_opt_init()
57 if (extbuf) { in inet6_opt_init()
58 *(uint8_t *)extbuf = 0; in inet6_opt_init()
59 *((uint8_t *)extbuf + 1) = extlen/8 - 1; in inet6_opt_init()
71 inet6_opt_append(void *extbuf, socklen_t extlen, int offset, uint8_t type, in inet6_opt_append() argument
84 if (extbuf) { in inet6_opt_append()
91 extlen = MIN(extlen, (*((uint8_t *)extbuf + 1) + 1) * 8); in inet6_opt_append()
102 if ((endlen > extlen) || !extbuf) { in inet6_opt_append()
103 if (extbuf) { in inet6_opt_append()
110 p = (uint8_t *)extbuf + offset; in inet6_opt_append()
143 inet6_opt_finish(void *extbuf, socklen_t extlen, int offset) in inet6_opt_finish() argument
148 if (extbuf) { in inet6_opt_finish()
155 extlen = MIN(extlen, (*((uint8_t *)extbuf + 1) + 1) * 8); in inet6_opt_finish()
162 if ((offset + padbytes > extlen) || !extbuf) { in inet6_opt_finish()
163 if (extbuf) { in inet6_opt_finish()
170 p = (uint8_t *)extbuf + offset; in inet6_opt_finish()
212 inet6_opt_next(void *extbuf, socklen_t extlen, int offset, uint8_t *typep, in inet6_opt_next() argument
224 extlen = MIN(extlen, (*((uint8_t *)extbuf + 1) + 1) * 8); in inet6_opt_next()
225 end = (uint8_t *)extbuf + extlen; in inet6_opt_next()
231 p = (uint8_t *)extbuf + offset; in inet6_opt_next()
261 return ((p - (uint8_t *)extbuf) + 2 + *lenp); in inet6_opt_next()
273 inet6_opt_find(void *extbuf, socklen_t extlen, int offset, uint8_t type, in inet6_opt_find() argument
279 offset = inet6_opt_next(extbuf, extlen, offset, &newtype, lenp, in inet6_opt_find()