OpenCores
URL https://opencores.org/ocsvn/1g_ethernet_dpi/1g_ethernet_dpi/trunk

Subversion Repositories 1g_ethernet_dpi

[/] [1g_ethernet_dpi/] [tags/] [v0.0/] [sw/] [dev/] [test_main/] [src/] [net/] [icmp.h] - Blame information for rev 3

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 kuzmi4
#ifndef _ICMP_H_
2
#define _ICMP_H_
3
 
4
#ifdef __cplusplus
5
extern "C"
6
{
7
#endif// __cplusplus
8
 
9
#include "eth.h" // _packed_struct
10
#include "net.h"
11
 
12
 
13
#define  ICMP_ECHO_RESP  0   // ICMP Echo reply
14
#define  ICMP_ECHO_REQ   8   // ICMP Echo request
15
 
16
 
17
#define  ICMP_DU_DATA_VOL 8 // RFC792, page#4: 64 bits of Original Data Datagram 
18
 
19
#define  ICMP_PROT   1     // ICMP Protocol number on IP
20
 
21
// ICMP Echo request/reply header
22
struct _icmp_hdr {
23
   u8   ptype;
24
   u8   pcode;
25
   u16  pchksum;
26
   u16  pid;
27
   u16  pseq;
28
} _packed_struct;
29
typedef struct _icmp_hdr icmp_hdr_t;
30
 
31
// Ext:
32
void eth_icmp_init(net_if_t *ip_net_if);
33
void eth_icmp(char *iv_data);
34
 
35
#ifdef __cplusplus
36
}
37
#endif// __cplusplus
38
 
39
#endif   // _ICMP_H_

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.