XenevaOS
Loading...
Searching...
No Matches
icmp.h
Go to the documentation of this file.
1
30#ifndef __ICMP_H__
31#define __ICMP_H__
32
33#include <Net/ipv4.h>
34#include <Fs/vfs.h>
35
36#ifdef ARCH_X64
37#pragma pack(push,1)
38#endif
39typedef struct _icmp_head_ {
40 unsigned char type;
41 unsigned char code;
42 unsigned short checksum;
43 unsigned short identifier;
44 unsigned short sequenceNum;
45 unsigned char payload[];
47#ifdef ARCH_X64
48#pragma pack(pop)
49#endif
50
51 /*
52 * ICMPInitialise -- initialise ICMP
53 */
54extern void ICMPInitialise();
55/*
56 * AuICMPHandle -- ICMP handler
57 */
58extern void AuICMPHandle(IPv4Header* ipv4, AuVFSNode* nic);
59/*
60* CreateICMPSocket -- create a new Internet
61* Control Message Protocol (ICMP) protocol
62*/
63extern int CreateICMPSocket();
64
65#endif
AuVFSNode * nic
Definition e1000.cpp:67
struct _icmp_head_ ICMPHeader
int CreateICMPSocket()
Definition icmp.cpp:239
void AuICMPHandle(IPv4Header *ipv4, AuVFSNode *nic)
Definition icmp.cpp:58
void ICMPInitialise()
Definition icmp.cpp:231
Definition vfs.h:98
Definition icmp.h:39
unsigned char code
Definition icmp.h:41
unsigned short identifier
Definition icmp.h:43
unsigned char type
Definition icmp.h:40
unsigned short sequenceNum
Definition icmp.h:44
unsigned short checksum
Definition icmp.h:42
unsigned char payload[]
Definition icmp.h:45
Definition ipv4.h:36