#include <xinu.h>
#include <stdio.h>
#include <string.h>
Go to the source code of this file.
◆ arp_dmp()
Definition at line 37 of file xsh_arp.c.
References AR_FREE, AR_PENDING, AR_RESOLVED, arpentry::arhaddr, ARP_HALEN, ARP_SIZ, arpentry::arpaddr, arpcache, arpentry::arpid, arpentry::arstate, and printf().
Referenced by xsh_arp().
45 printf(
" State Pid IP Address Hardware Address\n");
46 printf(
" ----- --- --------------- -----------------\n");
55 default:
printf(
" ?????");
break;
#define AR_FREE
ARPキャッシュエントリ状態:スロットが未使用
#define ARP_SIZ
キャシュ中のエントリ数
int32 printf(const char *,...)
struct arpentry arpcache[]
ARPキャッシュエントリテーブル
uint32 arpaddr
エントリのIPアドレス
#define ARP_HALEN
EthernetのMACアドレスサイズ
int int32
符号あり32ビット整数(int)
byte arhaddr[ARP_HALEN]
エントリのEthernetアドレス
#define AR_RESOLVED
ARPキャッシュエントリ状態:エントリが正常
#define AR_PENDING
ARPキャッシュエントリ状態:解決中
◆ xsh_arp()
shellcmd xsh_arp |
( |
int |
nargs, |
|
|
char * |
args[] |
|
) |
| |
Definition at line 12 of file xsh_arp.c.
References arp_dmp(), printf(), and strncmp().
16 if (nargs == 2 &&
strncmp(args[1],
"--help", 7) == 0) {
17 printf(
"Use: %s\n\n", args[0]);
19 printf(
"\tDisplays information from the ARP cache\n");
21 printf(
"\t--help\t display this help and exit\n");
int32 strncmp(const char *, const char *, int32)
int32 printf(const char *,...)