nd_opt_hdr
while ((size_t)len >= sizeof(struct nd_opt_hdr)) {
struct nd_opt_hdr *nd_opt_hdr = (struct nd_opt_hdr *)p;
len -= sizeof(struct nd_opt_hdr);
p += sizeof(struct nd_opt_hdr);
if (nd_opt_hdr->nd_opt_len * 8 - 2 > len) {
nd_opt_hdr->nd_opt_len, len);
switch (nd_opt_hdr->nd_opt_type) {
if (nd_opt_hdr->nd_opt_len != 4) {
prf = (struct nd_opt_prefix_info*) nd_opt_hdr;
if (nd_opt_hdr->nd_opt_len < 3) {
if ((nd_opt_hdr->nd_opt_len - 1) % 2 != 0) {
(nd_opt_hdr->nd_opt_len - 1) * 8);
rdnss = (struct nd_opt_rdnss*) nd_opt_hdr;
for (i=0; i < (nd_opt_hdr->nd_opt_len - 1)/2; i++,
if (nd_opt_hdr->nd_opt_len != 1) {
mtu = (struct nd_opt_mtu*) nd_opt_hdr;
nd_opt_hdr->nd_opt_type, nd_opt_hdr->nd_opt_len *
log_debug("\t\tUNKNOWN: %d", nd_opt_hdr->nd_opt_type);
len -= nd_opt_hdr->nd_opt_len * 8 - 2;
p += nd_opt_hdr->nd_opt_len * 8 - 2;
while ((size_t)len >= sizeof(struct nd_opt_hdr)) {
struct nd_opt_hdr *nd_opt_hdr = (struct nd_opt_hdr *)p;
len -= sizeof(struct nd_opt_hdr);
p += sizeof(struct nd_opt_hdr);
if (nd_opt_hdr->nd_opt_len * 8 - 2 > len) {
nd_opt_hdr->nd_opt_len, len);
log_debug("\tOption: %u (len: %u)", nd_opt_hdr->nd_opt_type,
nd_opt_hdr->nd_opt_len * 8);
switch (nd_opt_hdr->nd_opt_type) {
if (nd_opt_hdr->nd_opt_len == 1)
if (nd_opt_hdr->nd_opt_len == 1)
if (nd_opt_hdr->nd_opt_len != 4) {
prf = (struct nd_opt_prefix_info*) nd_opt_hdr;
if (nd_opt_hdr->nd_opt_len != 1) {
mtu = (struct nd_opt_mtu*) nd_opt_hdr;
if (nd_opt_hdr->nd_opt_len < 3) {
if ((nd_opt_hdr->nd_opt_len - 1) % 2 != 0) {
(nd_opt_hdr->nd_opt_len - 1) * 8);
rdnss = (struct nd_opt_rdnss*) nd_opt_hdr;
for (i=0; i < (nd_opt_hdr->nd_opt_len - 1)/2; i++,
log_debug("\t\tUNKNOWN: %d", nd_opt_hdr->nd_opt_type);
len -= nd_opt_hdr->nd_opt_len * 8 - 2;
p += nd_opt_hdr->nd_opt_len * 8 - 2;
sizeof(nd_opt_hdr) + sizeof(nd_opt_source_link_addr))
struct nd_opt_hdr nd_opt_hdr;
nd_opt_hdr.nd_opt_type = ND_OPT_SOURCE_LINKADDR;
nd_opt_hdr.nd_opt_len = 1;
sndmhdr.msg_iov[1].iov_base = (caddr_t)&nd_opt_hdr;
sndmhdr.msg_iov[1].iov_len = sizeof(nd_opt_hdr);
((sizeof(struct nd_opt_hdr) + ifp->if_addrlen + 7) & ~7)) {
struct nd_opt_hdr *nd_opt;
nd_opt = (struct nd_opt_hdr *)p;
struct nd_opt_hdr *nd_opt, *next_opt, *last_opt;
last_opt = (struct nd_opt_hdr *)((u_char *)opt + icmp6len);
next_opt = (struct nd_opt_hdr *)((caddr_t)nd_opt + olen);
struct nd_opt_hdr *nd_opts_src_lladdr;
struct nd_opt_hdr *nd_opts_tgt_lladdr;
maxlen += (sizeof(struct nd_opt_hdr) + ifp->if_addrlen + 7) & ~7;
int optlen = sizeof(struct nd_opt_hdr) + ifp->if_addrlen;
struct nd_opt_hdr *nd_opt = (struct nd_opt_hdr *)(nd_ns + 1);
maxlen += (sizeof(struct nd_opt_hdr) + ifp->if_addrlen + 7) & ~7;
int optlen = sizeof(struct nd_opt_hdr) + ifp->if_addrlen;
struct nd_opt_hdr *nd_opt = (struct nd_opt_hdr *)(nd_na + 1);
while ((size_t)len >= sizeof(struct nd_opt_hdr)) {
struct nd_opt_hdr *nd_opt_hdr = (struct nd_opt_hdr *)p;
len -= sizeof(struct nd_opt_hdr);
p += sizeof(struct nd_opt_hdr);
if (nd_opt_hdr->nd_opt_len * 8 - 2 > len) {
nd_opt_hdr->nd_opt_len, len);
switch (nd_opt_hdr->nd_opt_type) {
log_debug("\t\tUNKNOWN: %d", nd_opt_hdr->nd_opt_type);
len -= nd_opt_hdr->nd_opt_len * 8 - 2;
p += nd_opt_hdr->nd_opt_len * 8 - 2;
const struct nd_opt_hdr *op;
const struct nd_opt_hdr *opl; /* why there's no struct? */
op = (struct nd_opt_hdr *)bp;
opl = (struct nd_opt_hdr *)op;
opl = (struct nd_opt_hdr *)op;