Lines 1662-1682
Link Here
|
1662 |
*---------------------------------------------------------------------- |
1662 |
*---------------------------------------------------------------------- |
1663 |
*/ |
1663 |
*/ |
1664 |
|
1664 |
|
1665 |
int |
1665 |
void |
1666 |
VNetPrintJack(const VNetJack *jack, // IN: jack |
1666 |
VNetPrintJack(const VNetJack *jack, // IN: jack |
1667 |
char *buf) // OUT: info about jack |
1667 |
struct seq_file *seqf) // OUT: info about jack |
1668 |
{ |
1668 |
{ |
1669 |
int len = 0; |
|
|
1670 |
|
1671 |
read_lock(&vnetPeerLock); |
1669 |
read_lock(&vnetPeerLock); |
1672 |
if (!jack->peer) { |
1670 |
if (!jack->peer) { |
1673 |
len += sprintf(buf+len, "connected not "); |
1671 |
seq_printf(seqf, "connected not "); |
1674 |
} else { |
1672 |
} else { |
1675 |
len += sprintf(buf+len, "connected %s ", jack->peer->name); |
1673 |
seq_printf(seqf, "connected %s ", jack->peer->name); |
1676 |
} |
1674 |
} |
1677 |
read_unlock(&vnetPeerLock); |
1675 |
read_unlock(&vnetPeerLock); |
1678 |
|
|
|
1679 |
return len; |
1680 |
} |
1676 |
} |
1681 |
|
1677 |
|
1682 |
|
1678 |
|
Lines 1696-1747
Link Here
|
1696 |
*---------------------------------------------------------------------- |
1692 |
*---------------------------------------------------------------------- |
1697 |
*/ |
1693 |
*/ |
1698 |
|
1694 |
|
1699 |
int |
1695 |
void |
1700 |
VNetPrintPort(const VNetPort *port, // IN: port |
1696 |
VNetPrintPort(const VNetPort *port, // IN: port |
1701 |
char *buf) // OUT: info about port |
1697 |
struct seq_file *seqf) // OUT: info about port |
1702 |
{ |
1698 |
{ |
1703 |
int len = 0; |
1699 |
VNetPrintJack(&port->jack, seqf); |
1704 |
|
1700 |
|
1705 |
len += VNetPrintJack(&port->jack, buf+len); |
1701 |
seq_printf(seqf, "mac %02x:%02x:%02x:%02x:%02x:%02x ", |
1706 |
|
|
|
1707 |
len += sprintf(buf+len, "mac %02x:%02x:%02x:%02x:%02x:%02x ", |
1708 |
port->paddr[0], port->paddr[1], port->paddr[2], |
1702 |
port->paddr[0], port->paddr[1], port->paddr[2], |
1709 |
port->paddr[3], port->paddr[4], port->paddr[5]); |
1703 |
port->paddr[3], port->paddr[4], port->paddr[5]); |
1710 |
|
1704 |
|
1711 |
len += sprintf(buf+len, "ladrf %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x ", |
1705 |
seq_printf(seqf, "ladrf %02x:%02x:%02x:%02x:%02x:%02x:%02x:%02x ", |
1712 |
port->ladrf[0], port->ladrf[1], port->ladrf[2], |
1706 |
port->ladrf[0], port->ladrf[1], port->ladrf[2], |
1713 |
port->ladrf[3], port->ladrf[4], port->ladrf[5], |
1707 |
port->ladrf[3], port->ladrf[4], port->ladrf[5], |
1714 |
port->ladrf[6], port->ladrf[7]); |
1708 |
port->ladrf[6], port->ladrf[7]); |
1715 |
|
1709 |
|
1716 |
len += sprintf(buf+len, "flags IFF_RUNNING"); |
1710 |
seq_printf(seqf, "flags IFF_RUNNING"); |
1717 |
|
1711 |
|
1718 |
if (port->flags & IFF_UP) { |
1712 |
if (port->flags & IFF_UP) { |
1719 |
len += sprintf(buf+len, ",IFF_UP"); |
1713 |
seq_printf(seqf, ",IFF_UP"); |
1720 |
} |
1714 |
} |
1721 |
|
1715 |
|
1722 |
if (port->flags & IFF_BROADCAST) { |
1716 |
if (port->flags & IFF_BROADCAST) { |
1723 |
len += sprintf(buf+len, ",IFF_BROADCAST"); |
1717 |
seq_printf(seqf, ",IFF_BROADCAST"); |
1724 |
} |
1718 |
} |
1725 |
|
1719 |
|
1726 |
if (port->flags & IFF_DEBUG) { |
1720 |
if (port->flags & IFF_DEBUG) { |
1727 |
len += sprintf(buf+len, ",IFF_DEBUG"); |
1721 |
seq_printf(seqf, ",IFF_DEBUG"); |
1728 |
} |
1722 |
} |
1729 |
|
1723 |
|
1730 |
if (port->flags & IFF_PROMISC) { |
1724 |
if (port->flags & IFF_PROMISC) { |
1731 |
len += sprintf(buf+len, ",IFF_PROMISC"); |
1725 |
seq_printf(seqf, ",IFF_PROMISC"); |
1732 |
} |
1726 |
} |
1733 |
|
1727 |
|
1734 |
if (port->flags & IFF_MULTICAST) { |
1728 |
if (port->flags & IFF_MULTICAST) { |
1735 |
len += sprintf(buf+len, ",IFF_MULTICAST"); |
1729 |
seq_printf(seqf, ",IFF_MULTICAST"); |
1736 |
} |
1730 |
} |
1737 |
|
1731 |
|
1738 |
if (port->flags & IFF_ALLMULTI) { |
1732 |
if (port->flags & IFF_ALLMULTI) { |
1739 |
len += sprintf(buf+len, ",IFF_ALLMULTI"); |
1733 |
seq_printf(seqf, ",IFF_ALLMULTI"); |
1740 |
} |
1734 |
} |
1741 |
|
1735 |
|
1742 |
len += sprintf(buf+len, " "); |
1736 |
seq_printf(seqf, " "); |
1743 |
|
|
|
1744 |
return len; |
1745 |
} |
1737 |
} |
1746 |
|
1738 |
|
1747 |
|
1739 |
|