-
Notifications
You must be signed in to change notification settings - Fork 0
/
sr_icmp_types.h
19 lines (11 loc) · 918 Bytes
/
sr_icmp_types.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#pragma once
#include "sr_icmp.h"
#include "sr_router.h"
#include "sr_interface.h"
#include <netinet/ip.h>
void icmp_type_echo_reply(sr_router* router, uint8_t code, uint32_t rest, byte* packet, uint16_t packet_len, struct ip* ip_header, interface_t* intf);
void icmp_type_dst_unreach(uint8_t code, uint32_t rest, byte* packet, uint16_t packet_len, struct ip* ip_header, interface_t* intf);
void icmp_type_echo_request(uint8_t code, uint32_t rest, byte* packet, uint16_t packet_len, struct ip* ip_header, interface_t* intf);
void icmp_type_ttl(uint8_t code, uint32_t rest, byte* packet, uint16_t packet_len, struct ip* ip_header, interface_t* intf);
void icmp_type_traceroute(uint8_t code, uint32_t rest, byte* packet, uint16_t packet_len, struct ip* ip_header, interface_t* intf);
void icmp_type_bad_ip(uint8_t code, uint32_t rest, byte* packet, uint16_t packet_len, struct ip* ip_header, interface_t* intf);