add 203 codes
This commit is contained in:
36
Blatt02/A203/arp_packet_st.h
Normal file
36
Blatt02/A203/arp_packet_st.h
Normal file
@@ -0,0 +1,36 @@
|
||||
#ifndef ARP_PACKET_ST_H
|
||||
#define ARP_PACKET_ST_H
|
||||
|
||||
#define MAC_A_S 6
|
||||
|
||||
#include<stdint.h>
|
||||
#include<stddef.h>
|
||||
|
||||
typedef struct{
|
||||
uint8_t dest_ares[MAC_A_S];
|
||||
uint8_t send_ares[MAC_A_S];
|
||||
uint16_t pro_T;
|
||||
}mac_hdr;
|
||||
|
||||
typedef struct{
|
||||
uint16_t ar_hrd;
|
||||
uint16_t ar_pro;
|
||||
uint8_t ar_hln;
|
||||
uint8_t ar_pln;
|
||||
uint16_t ar_op;
|
||||
uint8_t ar_sha[MAC_A_S];
|
||||
uint32_t ar_spa;
|
||||
uint8_t ar_tha[MAC_A_S];
|
||||
uint32_t ar_tpa;
|
||||
}pkt_data;
|
||||
|
||||
typedef struct{
|
||||
uint16_t ar_pro;
|
||||
uint32_t ar_spa;
|
||||
uint8_t ar_sha[MAC_A_S];
|
||||
int count;
|
||||
}translation_table_entry;
|
||||
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user