version 1.38, 2013/03/11 17:40:11 |
version 1.39, 2013/12/20 02:04:09 |
|
|
fprintf(stderr, "Using PCB table at %lu\n", ptb->ktcbtab); |
fprintf(stderr, "Using PCB table at %lu\n", ptb->ktcbtab); |
retry: |
retry: |
kget(ptb->ktcbtab, &tcbtab, sizeof(tcbtab)); |
kget(ptb->ktcbtab, &tcbtab, sizeof(tcbtab)); |
prev = head = (struct inpcb *)&CIRCLEQ_FIRST( |
prev = head = (struct inpcb *)&TAILQ_FIRST( |
&((struct inpcbtable *)ptb->ktcbtab)->inpt_queue); |
&((struct inpcbtable *)ptb->ktcbtab)->inpt_queue); |
next = CIRCLEQ_FIRST(&tcbtab.inpt_queue); |
next = TAILQ_FIRST(&tcbtab.inpt_queue); |
|
|
if (ptb->vflag >= 2) |
if (ptb->vflag >= 2) |
fprintf(stderr, "PCB head at %p\n", head); |
fprintf(stderr, "PCB head at %p\n", head); |
|
|
if (ptb->vflag >= 2) |
if (ptb->vflag >= 2) |
fprintf(stderr, "Checking PCB %p\n", next); |
fprintf(stderr, "Checking PCB %p\n", next); |
kget((u_long)next, &inpcb, sizeof(inpcb)); |
kget((u_long)next, &inpcb, sizeof(inpcb)); |
if (CIRCLEQ_PREV(&inpcb, inp_queue) != prev) { |
if (TAILQ_PREV(&inpcb, inpthead, inp_queue) != prev) { |
if (nretry--) { |
if (nretry--) { |
warnx("pcb prev pointer insane"); |
warnx("pcb prev pointer insane"); |
goto retry; |
goto retry; |
|
|
" all attempts exausted"); |
" all attempts exausted"); |
} |
} |
prev = next; |
prev = next; |
next = CIRCLEQ_NEXT(&inpcb, inp_queue); |
next = TAILQ_NEXT(&inpcb, inp_queue); |
|
|
if (me.ss_family == AF_INET) { |
if (me.ss_family == AF_INET) { |
if ((inpcb.inp_flags & INP_IPV6) != 0) { |
if ((inpcb.inp_flags & INP_IPV6) != 0) { |