19IPADDR AsciiToIp6(
const char *p);
34#define DB_TCPDATA (512)
37#define DB_IPV6_ND (4096)
38#define DB_IPV6_ICMP (8192)
39#define DB_IPV6_ROUTE (16384)
40#define DB_IPV6_FRAG (32768)
41#define DB_IPV6_ERR (65536)
47void sShowCounters(
char *buffer,
int slen);
49void fShowCounters(FILE *fp);
55void FdShowRingData(
int fd,
const uint8_t *ringBuf, uint32_t bufLen,
56 uint32_t start, uint32_t end,
const char *indent=NULL);
57void ShowRingData(
const uint8_t *ringBuf, uint32_t bufLen,
58 uint32_t start, uint32_t end,
const char *indent=NULL);
59void FdShowData(
int fd,
const uint8_t *fromptr, uint16_t len);
60void ShowData(
const uint8_t *fromptr, uint16_t len);
61void ShowMac(
const MACADR *ma);
62void fdShowMac(
int fd,
const MACADR *ma);
64inline void ShowMac(
const MACADR &ma)
69void snShowMac(
char *buf,
size_t maxlen,
const MACADR *ma);
70inline void snShowMac(
char *buf,
size_t maxlen,
const MACADR &ma)
72 snShowMac(buf, maxlen, &ma);
75void MacToID(
MACADR *ma,
char *IDBuf);
78void print(
const char *);
80void putbytenum(
unsigned char c);
81IPADDR4 AsciiToIp4(
const char *p);
82MACADR AsciiToMac(
const char *p);
83BOOL ValidIPv4(
const char *p);
86#define AsciiToIp AsciiToIp4
88#define AsciiToIp AsciiToIp6
92int snShowIP4(
char *buf,
size_t maxlen,
const IPADDR4 ia);
96inline void ShowIP6(
const IPADDR &ia)
100inline int snShowIP6(
char *buf,
size_t maxlen,
const IPADDR &ia)
102 return ia.
sprintf(buf, maxlen);
104#define ShowIP ShowIP6
105#define snShowIP snShowIP6
107#define ShowIP ShowIP4
108#define snShowIP snShowIP4
116extern uint32_t GetPreciseTime(
void);
125unsigned long long Get_msec();
129 int kill(
int pid,
int sig);
136void fShowCounters(FILE *fp);
138void fShowMac(FILE *fp,
const MACADR *ma);
140void fShowIP4(FILE *fp,
const IPADDR4 ia);
143void fShowIP6(FILE *fp,
const IPADDR &ia);
144#define fShowIP fShowIP6
146#define fShowIP fShowIP4
168unsigned char *convertBinaryToHexAscii(
unsigned char *fromBufferPtr,
169 unsigned int fromByteCount,
170 unsigned char *toBufferPtr,
171 unsigned int toByteCount);
173unsigned char *convertHexAsciiToBinary(
unsigned char *fromBufferPtr,
174 unsigned int fromByteCount,
175 unsigned char *toBufferPtr,
176 unsigned int toByteCount);
191const char *bufnstr(
const char *search,
const char *target,
size_t len);
196#if ((defined _DEBUG) || (defined _DEBUG_PRINT))
197extern unsigned int DB_FLAGS;
203 iprintf("ASSERT failed at %d of %s\n", __LINE__, __FILE__); \
206#elif defined CORTEX_M7
210 iprintf("ASSERT failed at %d of %s\n", __LINE__, __FILE__); \
218 iprintf("ASSERT failed at %d of %s\n", __LINE__, __FILE__); \
223#define DBPRINT(x, y) \
224 if (DB_FLAGS & x) printf(y);
226 if (DB_FLAGS & x) putnum(y);
227#define DBBYTE(x, y) \
228 if (DB_FLAGS & x) putbytenum(y);
229#define DBPRINTF(x, ...) \
230 if (DB_FLAGS & x) printf(__VA_ARGS__);
231#define DBIPRINTF(x, ...) \
232 if (DB_FLAGS & x) iprintf(__VA_ARGS__);
234#define ASSERT(x) ((void)0)
235#define DBPRINT(x, y) ((void)0)
236#define DBNUM(x, y) ((void)0)
237#define DBBYTE(x, y) ((void)0)
238#define DBPRINTF(x, ...) ((void)0)
239#define DBIPRINTF(x, ...) ((void)0)
242#if ((defined _DEBUG) || (defined _DEBUG_PRINT))
243#define PPPDBPRINT(x) DBPRINT(DB_PPP, (x))
244#define PPPDBPRINTF(...) DBPRINTF(DB_PPP, __VA_ARGS__)
245#define PPPDBIPRINTF(...) DBIPRINTF(DB_PPP, __VA_ARGS__)
246#define PPPDBNUM(x) DBNUM(DB_PPP, (x))
247#define PPPDBBYTE(x) DBBYTE(DB_PPP, (x))
257#define PPPDBPRINTF(...)
258#define PPPDBIPRINTF(...)
264void LocalOutByte(
char c);
267 void Local_OutString(
const char *cp);
272#if ((defined _DEBUG) || (defined USER_CRITICAL_SANITY))
274#define USER_CRITICAL_ASSERT() \
275 if (critical_count != 0) \
277 Local_OutString("Illegal pend after USER_ENTER_CRITICAL(). Halting.\r\n"); \
281#elif (defined CORTEX_M7)
282#define USER_CRITICAL_ASSERT() \
283 if (critical_count != 0) \
285 Local_OutString("Illegal pend after USER_ENTER_CRITICAL(). Halting.\r\n"); \
290#define USER_CRITICAL_ASSERT() \
291 if (critical_count != 0) \
293 Local_OutString("Illegal pend after USER_ENTER_CRITICAL(). Halting.\r\n"); \
299#define USER_CRITICAL_ASSERT() ((void)0)
305BOOL OnModDev70(
void);
306void putleds(
unsigned char c);
307unsigned char getleds();
308void putdisp(
unsigned short w);
309unsigned short getdisp();
310unsigned char getdipsw();
315void putSegments(
unsigned char DisplayMask,
316 unsigned char DisplayData);
318void putDecimal(
unsigned char DisplayMask);
320unsigned char getCPLDver();
321unsigned char getCPLDrev();
324#define SevenSeg_0 (0x3F)
325#define SevenSeg_1 (0x06)
326#define SevenSeg_2 (0x5B)
327#define SevenSeg_3 (0x4F)
328#define SevenSeg_4 (0x66)
329#define SevenSeg_5 (0x6D)
330#define SevenSeg_6 (0x7C)
331#define SevenSeg_7 (0x07)
332#define SevenSeg_8 (0x7F)
333#define SevenSeg_9 (0x67)
334#define SevenSeg_A (0x77)
335#define SevenSeg_B (0x7F)
336#define SevenSeg_C (0x39)
337#define SevenSeg_D (0x3F)
338#define SevenSeg_E (0x79)
339#define SevenSeg_F (0x71)
340#define SevenSeg_H (0x76)
341#define SevenSeg_I (0x06)
342#define SevenSeg_J (0x1E)
343#define SevenSeg_L (0x38)
344#define SevenSeg_O (0x3F)
345#define SevenSeg_P (0x73)
346#define SevenSeg_S (0x6D)
347#define SevenSeg_U (0x3E)
348#define SevenSeg_b (0x7C)
349#define SevenSeg_c (0x58)
350#define SevenSeg_d (0x5E)
351#define SevenSeg_h (0x74)
352#define SevenSeg_l (0x06)
353#define SevenSeg_n (0x54)
354#define SevenSeg_o (0x53)
355#define SevenSeg_r (0x50)
356#define SevenSeg_u (0x1C)
357#define SevenSeg_Dash (0x40)
358#define SevenSeg_Decimal (0x80)
359#define SevenSeg_OFF (0x00)
Used to store and manipulate IPv4 addresses in dual stack mode.
Definition nettypes.h:208
Used to hold and manipulate IPv4 and IPv6 addresses in dual stack mode.
Definition ipv6_addr.h:41
void print(bool bCompact=true, bool bShowV4Raw=false) const
Print the IP address value to stdout.
int sprintf(char *cp, int maxl, bool bCompact=true, bool bShowV4Raw=false) const
Print the IP address to the specified buffer.
Used to store and manipulate MAC addresses.
Definition nettypes.h:69
NetBurner IPADDR4 Class. See the IPADDR4 Class page for complete documentation.