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/*
61 * AuICMPSendDestUnreachable -- RFC 792 type 3 (code as given).
62 * Includes original IP header + 8 bytes of payload.
63 */
65/*
66* CreateICMPSocket -- create a new Internet
67* Control Message Protocol (ICMP) protocol
68*/
69extern int CreateICMPSocket();
70
71#endif
unsigned char uint8_t
Definition acefiex.h:161
AuVFSNode * nic
Definition e1000.cpp:67
struct _icmp_head_ ICMPHeader
int CreateICMPSocket()
Definition icmp.cpp:246
void AuICMPSendDestUnreachable(IPv4Header *orig, AuVFSNode *nic, uint8_t code)
Definition icmp.cpp:110
void AuICMPHandle(IPv4Header *ipv4, AuVFSNode *nic)
Definition icmp.cpp:58
void ICMPInitialise()
Definition icmp.cpp:238
Definition vfs.h:129
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