inet6_opt_finish
extern int inet6_opt_finish(void *, socklen_t, int);
if (inet6_opt_finish(buf, 2, 24) != -1) {
extern int inet6_opt_finish(void *extbuf, socklen_t extlen, int offset);