XINU
Functions
arp_dump.c File Reference

RPキャッシュエントリの内容を表示する。 More...

#include <xinu.h>
Include dependency graph for arp_dump.c:

Go to the source code of this file.

Functions

void arp_dump (struct arpentry *arptr)
 

Detailed Description

RPキャッシュエントリの内容を表示する。

Definition in file arp_dump.c.

Function Documentation

◆ arp_dump()

void arp_dump ( struct arpentry arptr)

Definition at line 14 of file arp_dump.c.

References arpentry::arhaddr, ARP_HALEN, arpentry::arpaddr, arpentry::arpid, arpentry::arstate, kprintf(), and printf().

17 {
18  int32 i; /* Index for a MAC address */
19 
20  kprintf("State=%d, PID=%d IP=%08x, HW=", arptr->arstate,
21  arptr->arpid, arptr->arpaddr);
22  kprintf(" %02X", arptr->arhaddr[0]);
23  for (i = 1; i < ARP_HALEN; i++)
24  {
25  printf(":%02X", arptr->arhaddr[i]);
26  }
27  kprintf("\n");
28  return;
29 }
syscall kprintf(char *fmt,...)
ポーリングI/Oを使用して、フォーマットされた文字列をコンソールに出力する。
Definition: kprintf.c:98
int32 printf(const char *,...)
Definition: printf.c:13
int32 arstate
エントリの状態
Definition: arp.h:75
uint32 arpaddr
エントリのIPアドレス
Definition: arp.h:77
#define ARP_HALEN
EthernetのMACアドレスサイズ
Definition: arp.h:8
int int32
符号あり32ビット整数(int)
Definition: kernel.h:11
byte arhaddr[ARP_HALEN]
エントリのEthernetアドレス
Definition: arp.h:81
pid32 arpid
待機中プロセスか-1
Definition: arp.h:79
Here is the call graph for this function: