Impulse 463E Uživatelský manuál Strana 96

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 109
  • Tabulka s obsahem
  • ŘEŠENÍ PROBLÉMŮ
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 95
© Sealevel Systems, Inc.
- 93 -
SeaI/O User Manual
Simple Find Using print_info Function
This section will show a simple find on all Sealevel Devices. There is a helper
function that is used to print out the information discovered about each unit. The
source code segment for the helper function is listed below.
void print_info(ceth_device_p c)
{
printf("Type : %s\n",
c->type==SeaIO_Ethernet?"SeaIO Ethernet"
:c->type==SeaLink_Dev?"SeaLink Device"
:"Who Knows?");
printf("Mac : %2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X\n",
c->mac_address.c[0],
c->mac_address.c[1],
c->mac_address.c[2],
c->mac_address.c[3],
c->mac_address.c[4],
c->mac_address.c[5]);
printf("IP : %d.%d.%d.%d\n",c->ip_address.c[0],
c->ip_address.c[1],
c->ip_address.c[2],
c->ip_address.c[3]);
printf("NetMask : %d.%d.%d.%d\n",c->net_mask.c[0],
c->net_mask.c[1],
c->net_mask.c[2],
c->net_mask.c[3]);
if(c->gateway.i == 0)
{
printf("Gateway: Not Set\n");
}
else
{
printf("Gateway : %d.%d.%d.%d\n",c->gateway.c[0],
c->gateway.c[1],
c->gateway.c[2],
c->gateway.c[3]);
printf("Name : %s\n",c->name);
printf("DHCP Enabled? : %s\n",
c->dhcp_enabled?"Yes":"No");
}
Zobrazit stránku 95
1 2 ... 91 92 93 94 95 96 97 98 99 100 101 ... 108 109

Komentáře k této Příručce

Žádné komentáře