NetBurner 3.1
netrx.h
1 /*NB_REVISION*/
2 
3 /*NB_COPYRIGHT*/
4 
5 /*******************************************************************************
6  * @file netrx.h
7  * This is the header file for adding custom ethenet handlers and passing
8  * ethernet frames in the bottom of the TCP/IP stack.
9  *
10  * Custom handlers require that the system is (re)compiled with the
11  * ALLOW_CUSTOM_NET_DO_RX macro defined.
12  *******************************************************************************/
13 
14 #ifndef _NETRX_H
15 #define _NETRX_H
16 
17 #include <predef.h>
18 
19 #ifdef ALLOW_CUSTOM_NET_DO_RX
20 
37 typedef int (*netDoRXFunc)(PoolPtr, uint16_t, int);
38 
39 extern netDoRXFunc CustomNetDoRX;
40 
50 inline netDoRXFunc SetCustomNetDoRX(netDoRXFunc customFunc)
51 {
52  netDoRXFunc ret = CustomNetDoRX;
53  CustomNetDoRX = customFunc;
54  return ret;
55 }
56 
63 inline netDoRXFunc ClearCustomNetDoRX()
64 {
65  return SetCustomNetDoRX(NULL);
66 }
67 #endif
68 
81 int NetDoRX(PoolPtr pp, uint16_t ocount, int if_num);
82 
83 #endif /* ----- #ifndef _NETRX_H ----- */
#define NULL
Definition: nm_bsp.h:76