Voxia OS
v0.0.1
Hobby Project Operating System Targeting x86-64
Loading...
Searching...
No Matches
icmp.h
Go to the documentation of this file.
1
#ifndef __NET__ICMP_H__
2
#define __NET__ICMP_H__
3
4
#include "
net/ipv4.h
"
5
#include "
net/netdev.h
"
6
#include <
type.h
>
7
8
struct
icmp_header
{
9
uint8_t
type
;
10
uint8_t
code
;
11
uint16_t
checksum
;
12
}
__attribute__
((packed));
13
14
struct
icmp_echo
{
15
uint8_t
type
;
// 8 = request, 0 = reply
16
uint8_t
code
;
// selalu 0 untuk echo
17
uint16_t
checksum
;
18
19
uint16_t
identifier
;
20
uint16_t
sequence
;
21
22
uint8_t
data
[];
// payload (opsional, variabel)
23
}
__attribute__
((packed));
24
25
void
handle_icmp
(
netdev_t
* dev,
struct
ipv4_header
* ip,
uint8_t
mac_dst[6]);
26
#endif
// __NET__ICMP_H__
__attribute__
typedef __attribute__
Definition
msi.c:47
ipv4.h
handle_icmp
void handle_icmp(netdev_t *dev, struct ipv4_header *ip, uint8_t mac_dst[6])
Definition
icmp.c:11
netdev.h
netdev_t
struct netdev netdev_t
Definition
netdev.h:19
icmp_echo
Definition
icmp.h:14
icmp_echo::checksum
uint16_t checksum
Definition
icmp.h:17
icmp_echo::code
uint8_t code
Definition
icmp.h:16
icmp_echo::sequence
uint16_t sequence
Definition
icmp.h:20
icmp_echo::identifier
uint16_t identifier
Definition
icmp.h:19
icmp_echo::type
uint8_t type
Definition
icmp.h:15
icmp_echo::data
uint8_t data[]
Definition
icmp.h:22
icmp_header
Definition
icmp.h:8
icmp_header::type
uint8_t type
Definition
icmp.h:9
icmp_header::checksum
uint16_t checksum
Definition
icmp.h:11
icmp_header::code
uint8_t code
Definition
icmp.h:10
ipv4_header
Definition
ipv4.h:8
type.h
uint16_t
unsigned short uint16_t
Definition
type.h:13
uint8_t
unsigned char uint8_t
Definition
type.h:7
kernel
net
icmp.h
Generated on Sat May 30 2026 11:09:57 for Voxia OS by
1.13.2