Files
TeslaRel410/CODE/RP/MUNGA_L4/NetNub/include/ICMP.H
T
CydandClaude Fable 5 fdd9ac9d97 Initial import: Tesla Release 4.10 (Tesla:BattleTech & Tesla:Red Planet)
Archival snapshot of the Virtual World Entertainment Tesla cockpit
software, 1994-1996: MUNGA engine and L4 pod layer source (Borland
C++ 5.0), BT/RP game code, and game content (models, audio, maps,
gauges, Division renderer data). Includes third-party libraries:
Division dVS/DPL graphics, HMI SOS audio, WATTCP networking.

Files are preserved byte-for-byte (.gitattributes disables all
line-ending conversion). README.md documents the layout, target
hardware, and toolchain.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 13:21:58 -05:00

102 lines
2.0 KiB
C++

#ifndef _wattcp_icmp_h
#define _wattcp_icmp_h
//#include <wattcp/wattcp.h>
#include <wattcp.h>
typedef struct icmp_unused {
byte type;
byte code;
word checksum;
longword unused;
in_Header ip;
byte spares[ 8 ];
};
typedef struct icmp_pointer {
byte type;
byte code;
word checksum;
byte pointer;
byte unused[ 3 ];
in_Header ip;
};
typedef struct icmp_ip {
byte type;
byte code;
word checksum;
longword ipaddr;
in_Header ip;
};
typedef struct icmp_echo {
byte type;
byte code;
word checksum;
word identifier;
word sequence;
longword index;
};
typedef struct icmp_timestamp {
byte type;
byte code;
word checksum;
word identifier;
word sequence;
longword original; /* original timestamp */
longword receive; /* receive timestamp */
longword transmit; /* transmit timestamp */
};
typedef struct icmp_info {
byte type;
byte code;
word checksum;
word identifier;
word sequence;
};
typedef union {
struct icmp_unused unused;
struct icmp_pointer pointer;
struct icmp_ip ip;
struct icmp_echo echo;
struct icmp_timestamp timestamp;
struct icmp_info info;
} icmp_pkt;
typedef struct _pkt {
in_Header in;
icmp_pkt icmp;
in_Header data;
};
#define ICMPTYPE_ECHOREPLY 0
#define ICMPTYPE_UNREACHABLE 3
#define ICMPTYPE_TIMEEXCEEDED 11
typedef enum ICMP_UnreachableCodes
{
ICMP_UNREACH_NET = 0,
ICMP_UNREACH_HOST = 1,
ICMP_UNREACH_PROTO = 2,
ICMP_UNREACH_PORT = 3,
ICMP_UNREACH_FRAGNEEDED = 4,
ICMP_UNREACH_SRCROUTEFAILED = 5
};
typedef enum ICMP_TimeExceededCodes
{
ICMP_EXCEEDED_TTL = 0,
ICMP_EXCEEDED_FRAGREASM = 1
};
/* a user-installed ICMP handler */
typedef int (*icmp_handler_type)( in_Header *ip );
/* install a user ICMP handler, or NULL to disable */
void set_icmp_handler( icmp_handler_type user_handler );
#endif /* ndef _wattcp_icmp_h */