Lines Matching defs:extbuf
43 #define bufpos(p) ((p) - (uint8_t *)extbuf)
47 * extension header. If extbuf is not NULL then it initializes its length
51 inet6_opt_init(void *extbuf, socklen_t extlen)
53 if (extbuf && ((extlen < 0) || (extlen % 8))) {
57 if (extbuf) {
58 *(uint8_t *)extbuf = 0;
59 *((uint8_t *)extbuf + 1) = extlen/8 - 1;
71 inet6_opt_append(void *extbuf, socklen_t extlen, int offset, uint8_t type,
84 if (extbuf) {
91 extlen = MIN(extlen, (*((uint8_t *)extbuf + 1) + 1) * 8);
102 if ((endlen > extlen) || !extbuf) {
103 if (extbuf) {
110 p = (uint8_t *)extbuf + offset;
143 inet6_opt_finish(void *extbuf, socklen_t extlen, int offset)
148 if (extbuf) {
155 extlen = MIN(extlen, (*((uint8_t *)extbuf + 1) + 1) * 8);
162 if ((offset + padbytes > extlen) || !extbuf) {
163 if (extbuf) {
170 p = (uint8_t *)extbuf + offset;
212 inet6_opt_next(void *extbuf, socklen_t extlen, int offset, uint8_t *typep,
224 extlen = MIN(extlen, (*((uint8_t *)extbuf + 1) + 1) * 8);
225 end = (uint8_t *)extbuf + extlen;
231 p = (uint8_t *)extbuf + offset;
261 return ((p - (uint8_t *)extbuf) + 2 + *lenp);
273 inet6_opt_find(void *extbuf, socklen_t extlen, int offset, uint8_t type,
279 offset = inet6_opt_next(extbuf, extlen, offset, &newtype, lenp,