Modules/IPStack - Add structure for propagating ICMP errors
[tpg/acess2.git] / KernelLand / Modules / IPStack / ipstack.h
index ddcdde9..3833ce7 100644 (file)
@@ -15,7 +15,16 @@ typedef struct sAdapter      tAdapter;
 typedef struct sInterface      tInterface;
 typedef struct sSocketFile     tSocketFile;
 
-typedef void   (*tIPCallback)(tInterface *Interface, void *Address, int Length, void *Buffer);
+typedef enum eIPErrorMode
+{
+       IPERR_MISC,
+       IPERR_HOST_UNREACHABLE,
+       IPERR_PORT_UNREACHABLE,
+} tIPErrorMode;
+
+// NOTE: Non-const to allow reuse of Rx buffer for prepping Tx
+typedef void   tIPRxCallback(tInterface *Interface, void *Address, int Length, void *Buffer);
+typedef void   tIPErrorCallback(tInterface *Interface, tIPErrorMode mode, const void *Address, int Length, const void *Buffer);
 
 enum eInterfaceTypes {
        AF_NULL,

UCC git Repository :: git.ucc.asn.au