version 1.37, 2013/12/20 02:04:09 |
version 1.38, 2013/12/24 22:26:20 |
|
|
read_ns(void) |
read_ns(void) |
{ |
{ |
struct inpcbtable pcbtable; |
struct inpcbtable pcbtable; |
struct inpcb *head, *prev, *next; |
struct inpcb *next; |
struct inpcb inpcb; |
struct inpcb inpcb; |
struct socket sockb; |
struct socket sockb; |
struct tcpcb tcpcb; |
struct tcpcb tcpcb; |
|
|
again: |
again: |
KREAD(off, &pcbtable, sizeof (struct inpcbtable)); |
KREAD(off, &pcbtable, sizeof (struct inpcbtable)); |
|
|
prev = head = (struct inpcb *)&((struct inpcbtable *)off)->inpt_queue; |
|
next = TAILQ_FIRST(&pcbtable.inpt_queue); |
next = TAILQ_FIRST(&pcbtable.inpt_queue); |
|
|
while (next != head) { |
while (next != NULL) { |
KREAD(next, &inpcb, sizeof (inpcb)); |
KREAD(next, &inpcb, sizeof (inpcb)); |
if (TAILQ_PREV(&inpcb, inpthead, inp_queue) != prev) { |
|
error("Kernel state in transition"); |
|
return 0; |
|
} |
|
prev = next; |
|
next = TAILQ_NEXT(&inpcb, inp_queue); |
next = TAILQ_NEXT(&inpcb, inp_queue); |
|
|
if (!aflag) { |
if (!aflag) { |