Skip to main content

4. Packet Format (数据包格式)

🇨🇳 中文

为了传达从 <协议,地址> 对到48位以太网地址的映射,需要一种体现地址解析协议的数据包格式。数据包的格式如下。

以太网传输层 (用户不一定能访问):

  • 48位: 目标以太网地址
  • 48位: 发送者以太网地址
  • 16位: 协议类型 = ether_type$ADDRESS_RESOLUTION

以太网数据包数据:

  • 16位: (ar$hrd) 硬件地址空间 (例如,以太网,分组无线电网)
  • 16位: (ar$pro) 协议地址空间。对于以太网硬件,这来自类型字段集合 ether_typ$<protocol>
  • 8位: (ar$hln) 每个硬件地址的字节长度
  • 8位: (ar$pln) 每个协议地址的字节长度
  • 16位: (ar$op) 操作码 (ares_op$REQUEST | ares_op$REPLY)
  • n字节: (ar$sha) 本数据包发送者的硬件地址,n来自 ar$hln 字段
  • m字节: (ar$spa) 本数据包发送者的协议地址,m来自 ar$pln 字段
  • n字节: (ar$tha) 本数据包目标的硬件地址(如果已知)
  • m字节: (ar$tpa) 目标的协议地址

🇬🇧 English

To communicate mappings from <protocol, address> pairs to 48.bit Ethernet addresses, a packet format that embodies the Address Resolution protocol is needed. The format of the packet follows.

Ethernet transmission layer (not necessarily accessible to the user):

  • 48.bit: Ethernet address of destination
  • 48.bit: Ethernet address of sender
  • 16.bit: Protocol type = ether_type$ADDRESS_RESOLUTION

Ethernet packet data:

  • 16.bit: (ar$hrd) Hardware address space (e.g., Ethernet, Packet Radio Net.)
  • 16.bit: (ar$pro) Protocol address space. For Ethernet hardware, this is from the set of type fields ether_typ$<protocol>
  • 8.bit: (ar$hln) byte length of each hardware address
  • 8.bit: (ar$pln) byte length of each protocol address
  • 16.bit: (ar$op) opcode (ares_op$REQUEST | ares_op$REPLY)
  • nbytes: (ar$sha) Hardware address of sender of this packet, n from the ar$hln field
  • mbytes: (ar$spa) Protocol address of sender of this packet, m from the ar$pln field
  • nbytes: (ar$tha) Hardware address of target of this packet (if known)
  • mbytes: (ar$tpa) Protocol address of target

🇯🇵 日本語

<プロトコル、アドレス>ペアから48ビットイーサネットアドレスへのマッピングを伝達するために、アドレス解決プロトコル (Address Resolution Protocol) を具現化したパケットフォーマットが必要です。パケットの形式は以下の通りです。

イーサネット伝送層 (ユーザーが必ずしもアクセスできるとは限らない):

  • 48ビット: 宛先のイーサネットアドレス
  • 48ビット: 送信者のイーサネットアドレス
  • 16ビット: プロトコルタイプ = ether_type$ADDRESS_RESOLUTION

イーサネットパケットデータ:

  • 16ビット: (ar$hrd) ハードウェアアドレス空間 (例: イーサネット、パケット無線ネットワーク)
  • 16ビット: (ar$pro) プロトコルアドレス空間。イーサネットハードウェアの場合、これはタイプフィールドのセット ether_typ$<protocol> からのものです
  • 8ビット: (ar$hln) 各ハードウェアアドレスのバイト長
  • 8ビット: (ar$pln) 各プロトコルアドレスのバイト長
  • 16ビット: (ar$op) オペコード (ares_op$REQUEST | ares_op$REPLY)
  • nバイト: (ar$sha) このパケットの送信者のハードウェアアドレス、nは ar$hln フィールドから
  • mバイト: (ar$spa) このパケットの送信者のプロトコルアドレス、mは ar$pln フィールドから
  • nバイト: (ar$tha) このパケットのターゲットのハードウェアアドレス (既知の場合)
  • mバイト: (ar$tpa) ターゲットのプロトコルアドレス

🇫🇷 Français

Pour communiquer les mappages de paires <protocole, adresse> vers des adresses Ethernet 48 bits, un format de paquet qui incarne le protocole de résolution d'adresse est nécessaire. Le format du paquet suit.

Couche de transmission Ethernet (pas nécessairement accessible à l'utilisateur) :

  • 48 bits : Adresse Ethernet de destination
  • 48 bits : Adresse Ethernet de l'expéditeur
  • 16 bits : Type de protocole = ether_type$ADDRESS_RESOLUTION

Données du paquet Ethernet :

  • 16 bits : (ar$hrd) Espace d'adresse matérielle (par ex., Ethernet, réseau radio par paquets)
  • 16 bits : (ar$pro) Espace d'adresse de protocole. Pour le matériel Ethernet, cela provient de l'ensemble des champs de type ether_typ$<protocol>
  • 8 bits : (ar$hln) longueur en octets de chaque adresse matérielle
  • 8 bits : (ar$pln) longueur en octets de chaque adresse de protocole
  • 16 bits : (ar$op) code d'opération (ares_op$REQUEST | ares_op$REPLY)
  • n octets : (ar$sha) Adresse matérielle de l'expéditeur de ce paquet, n provient du champ ar$hln
  • m octets : (ar$spa) Adresse de protocole de l'expéditeur de ce paquet, m provient du champ ar$pln
  • n octets : (ar$tha) Adresse matérielle de la cible de ce paquet (si connue)
  • m octets : (ar$tpa) Adresse de protocole de la cible

🇩🇪 Deutsch

Um Zuordnungen von <Protokoll, Adresse>-Paaren zu 48-Bit-Ethernet-Adressen zu kommunizieren, wird ein Paketformat benötigt, das das Address Resolution Protocol verkörpert. Das Format des Pakets folgt.

Ethernet-Übertragungsschicht (nicht unbedingt für den Benutzer zugänglich):

  • 48 Bit: Ethernet-Adresse des Ziels
  • 48 Bit: Ethernet-Adresse des Absenders
  • 16 Bit: Protokolltyp = ether_type$ADDRESS_RESOLUTION

Ethernet-Paketdaten:

  • 16 Bit: (ar$hrd) Hardware-Adressraum (z.B. Ethernet, Packet Radio Net.)
  • 16 Bit: (ar$pro) Protokoll-Adressraum. Für Ethernet-Hardware stammt dies aus der Menge der Typfelder ether_typ$<protocol>
  • 8 Bit: (ar$hln) Byte-Länge jeder Hardware-Adresse
  • 8 Bit: (ar$pln) Byte-Länge jeder Protokoll-Adresse
  • 16 Bit: (ar$op) Opcode (ares_op$REQUEST | ares_op$REPLY)
  • n Bytes: (ar$sha) Hardware-Adresse des Absenders dieses Pakets, n aus dem ar$hln-Feld
  • m Bytes: (ar$spa) Protokoll-Adresse des Absenders dieses Pakets, m aus dem ar$pln-Feld
  • n Bytes: (ar$tha) Hardware-Adresse des Ziels dieses Pakets (falls bekannt)
  • m Bytes: (ar$tpa) Protokoll-Adresse des Ziels

🇮🇹 Italiano

Per comunicare le mappature da coppie <protocollo, indirizzo> a indirizzi Ethernet a 48 bit, è necessario un formato di pacchetto che incorpori il protocollo di risoluzione degli indirizzi. Il formato del pacchetto segue.

Livello di trasmissione Ethernet (non necessariamente accessibile all'utente):

  • 48 bit: Indirizzo Ethernet di destinazione
  • 48 bit: Indirizzo Ethernet del mittente
  • 16 bit: Tipo di protocollo = ether_type$ADDRESS_RESOLUTION

Dati del pacchetto Ethernet:

  • 16 bit: (ar$hrd) Spazio indirizzi hardware (ad es., Ethernet, Packet Radio Net.)
  • 16 bit: (ar$pro) Spazio indirizzi protocollo. Per hardware Ethernet, questo proviene dall'insieme dei campi tipo ether_typ$<protocol>
  • 8 bit: (ar$hln) lunghezza in byte di ciascun indirizzo hardware
  • 8 bit: (ar$pln) lunghezza in byte di ciascun indirizzo protocollo
  • 16 bit: (ar$op) opcode (ares_op$REQUEST | ares_op$REPLY)
  • n byte: (ar$sha) Indirizzo hardware del mittente di questo pacchetto, n dal campo ar$hln
  • m byte: (ar$spa) Indirizzo protocollo del mittente di questo pacchetto, m dal campo ar$pln
  • n byte: (ar$tha) Indirizzo hardware del target di questo pacchetto (se noto)
  • m byte: (ar$tpa) Indirizzo protocollo del target