NetBurner 3.5.6
PDF Version |
Macros | |
#define | DB_TCPIP (1) |
Flags to control the debug print functions. | |
#define | DB_HTTP (2) |
HTTP debug messages. | |
#define | DB_ETHER (4) |
Ethernet debug messages. | |
#define | DB_RTOS (8) |
RTOS debug messages. | |
#define | DB_BUFFER (16) |
Buffer debug messages. | |
#define | DB_PPP (32) |
PPP debug messages. | |
#define | DB_AU (64) |
Authentication debug messages. | |
#define | DB_MAIL (128) |
Mail debug messages. | |
#define | DB_IP (256) |
IP debug messages. | |
#define | DB_TCPDATA (512) |
TCP data debug messages. | |
#define | DB_SSL (1024) |
SSL debug messages. | |
#define | DB_SNMP (2048) |
SNMP debug messages. | |
#define | DB_IPV6_ND (4096) |
IPv6 Neighbor Discovery debug messages. | |
#define | DB_IPV6_ICMP (8192) |
IPv6 ICMP debug messages. | |
#define | DB_IPV6_ROUTE (16384) |
IPv6 routing debug messages. | |
#define | DB_IPV6_FRAG (32768) |
IPv6 fragmentation debug messages. | |
#define | DB_IPV6_ERR (65536) |
IPv6 error debug messages. | |
Functions | |
IPADDR | AsciiToIp6 (const char *p) |
Convert an ASCII IPv6 string to an IP address. | |
void | ShowCounters () |
Dump all system counters to stdio. | |
void | sShowCounters (char *buffer, int slen) |
Dump all system counters to a memory buffer. | |
void | FdShowRingData (int fd, const uint8_t *ringBuf, uint32_t bufLen, uint32_t start, uint32_t end, const char *indent=NULL) |
Dump part of a ring buffer to file descriptor. | |
void | ShowRingData (const uint8_t *ringBuf, uint32_t bufLen, uint32_t start, uint32_t end, const char *indent=NULL) |
Dump part of a ring buffer to stdio. | |
void | FdShowData (int fd, const uint8_t *fromptr, uint16_t len) |
Dump a block of data to file descriptor and show in ASCII and hex. | |
void | ShowData (const uint8_t *fromptr, uint16_t len) |
Dump a block of data to stdio and show in ASCII and hex. | |
void | ShowMac (const MACADR *ma) |
Dump a MAC address to stdio. | |
void | fdShowMac (int fd, const MACADR *ma) |
Dump a MAC address to file descriptor. | |
void | ShowMac (const MACADR &ma) |
Dump a MAC address to stdio (reference version) | |
void | snShowMac (char *buf, size_t maxlen, const MACADR *ma) |
Dump a MAC address to character buffer. | |
void | snShowMac (char *buf, size_t maxlen, const MACADR &ma) |
Dump a MAC address to character buffer (reference version) | |
void | MacToID (MACADR *ma, char *IDBuf) |
Write 6 character ID string based on unique portion of MAC. | |
void | outbyte (char c) |
Write out a single, unbuffered byte to stdio. | |
void | print (const char *str) |
Write out a zero-terminated, unbuffered string. | |
void | putnum (int i) |
Write out a hexadecimal, unbuffered number to stdio. | |
void | putbytenum (unsigned char c) |
Write out a hexadecimal, unbuffered byte to stdio. | |
IPADDR4 | AsciiToIp4 (const char *p) |
Convert an ASCII IPv4 string to an IP address. | |
MACADR | AsciiToMac (const char *p) |
Convert an ASCII MAC address string to a MAC address. | |
BOOL | ValidIPv4 (const char *p) |
Validate if a string contains a valid IPv4 address. | |
void | ShowIP4 (const IPADDR4 ia) |
Dump an IPv4 address in ASCII IP string format to stdio. | |
int | snShowIP4 (char *buf, size_t maxlen, const IPADDR4 ia) |
Dump an IPv4 address in ASCII IP string format to character buffer. | |
void | ShowIP6 (const IPADDR &ia) |
Dump an IPv6 address in ASCII IP string format to stdio. | |
int | snShowIP6 (char *buf, size_t maxlen, const IPADDR &ia) |
Dump an IPv6 address in ASCII IP string format to character buffer. | |
uint32_t | GetPreciseTime (void) |
Converts an integer to ASCII (adds the stdlib itoa) | |
unsigned long long | Get_msec () |
Returns the number of milliseconds as a 64-bit value. | |
int | kill (int pid, int sig) |
Send a signal to a process. | |
void | _exit (int i) |
Terminate the calling process. | |
int | _fini (void) |
Finalization function. | |
unsigned char * | convertBinaryToHexAscii (unsigned char *fromBufferPtr, unsigned int fromByteCount, unsigned char *toBufferPtr, unsigned int toByteCount) |
Convert binary data to hexadecimal ASCII. | |
unsigned char * | convertHexAsciiToBinary (unsigned char *fromBufferPtr, unsigned int fromByteCount, unsigned char *toBufferPtr, unsigned int toByteCount) |
Convert hexadecimal ASCII to binary data. | |
const char * | bufnstr (const char *search, const char *target, size_t len) |
Search for a C string in an arbitrary memory blob that may contain NULL chars. | |
#include< utils.h>
#define DB_TCPIP (1) |
void _exit | ( | int | i | ) |
int _fini | ( | void | ) |
IPADDR4 AsciiToIp4 | ( | const char * | p | ) |
IPADDR AsciiToIp6 | ( | const char * | p | ) |
#include <utils.h>
Convert an ASCII IPv6 string to an IP address.
p | Pointer to null-terminated ASCII IPv6 string |
MACADR AsciiToMac | ( | const char * | p | ) |
const char * bufnstr | ( | const char * | search, |
const char * | target, | ||
size_t | len ) |
#include <utils.h>
Search for a C string in an arbitrary memory blob that may contain NULL chars.
search | Pointer to the buffer to search |
target | The C string being searched for |
len | Length of the search buffer |
unsigned char * convertBinaryToHexAscii | ( | unsigned char * | fromBufferPtr, |
unsigned int | fromByteCount, | ||
unsigned char * | toBufferPtr, | ||
unsigned int | toByteCount ) |
#include <utils.h>
Convert binary data to hexadecimal ASCII.
fromBufferPtr | Source binary data |
fromByteCount | Source byte count |
toBufferPtr | Buffer for converted hexadecimal ASCII data |
toByteCount | Size of destination buffer |
unsigned char * convertHexAsciiToBinary | ( | unsigned char * | fromBufferPtr, |
unsigned int | fromByteCount, | ||
unsigned char * | toBufferPtr, | ||
unsigned int | toByteCount ) |
#include <utils.h>
Convert hexadecimal ASCII to binary data.
fromBufferPtr | Source hexadecimal ASCII data |
fromByteCount | Source byte count |
toBufferPtr | Buffer for converted binary data |
toByteCount | Size of destination buffer |
void FdShowData | ( | int | fd, |
const uint8_t * | fromptr, | ||
uint16_t | len ) |
#include <utils.h>
Dump a block of data to file descriptor and show in ASCII and hex.
fd | File descriptor to write to |
fromptr | Pointer to data to display |
len | Number of bytes to display |
void fdShowMac | ( | int | fd, |
const MACADR * | ma ) |
void FdShowRingData | ( | int | fd, |
const uint8_t * | ringBuf, | ||
uint32_t | bufLen, | ||
uint32_t | start, | ||
uint32_t | end, | ||
const char * | indent = NULL ) |
#include <utils.h>
Dump part of a ring buffer to file descriptor.
fd | File descriptor to write to |
ringBuf | Pointer to ring buffer data |
bufLen | Total length of ring buffer |
start | Start offset in ring buffer |
end | End offset in ring buffer |
indent | Optional indentation string for formatting (can be NULL) |
unsigned long long Get_msec | ( | ) |
#include <utils.h>
Returns the number of milliseconds as a 64-bit value.
Number | of milliseconds |
|
extern |
#include <utils.h>
Converts an integer to ASCII (adds the stdlib itoa)
value | Integer value to convert |
buffer | Buffer to store the ASCII representation |
radix | Base for conversion (e.g., 10 for decimal, 16 for hexadecimal) |
Gets the time tick since system start at a higher resolution
Resolution depends on the platform: 0.868-us for MOD5234/70, and 1.929-us for MOD5282
int kill | ( | int | pid, |
int | sig ) |
#include <utils.h>
Send a signal to a process.
pid | Process ID |
sig | Signal number |
void MacToID | ( | MACADR * | ma, |
char * | IDBuf ) |
void outbyte | ( | char | c | ) |
void print | ( | const char * | str | ) |
#include <utils.h>
Write out a zero-terminated, unbuffered string.
str | Pointer to null-terminated string to output |
void putbytenum | ( | unsigned char | c | ) |
#include <utils.h>
Write out a hexadecimal, unbuffered byte to stdio.
c | Byte value to output in hexadecimal format |
void putnum | ( | int | i | ) |
#include <utils.h>
Write out a hexadecimal, unbuffered number to stdio.
i | Integer value to output in hexadecimal format |
void ShowData | ( | const uint8_t * | fromptr, |
uint16_t | len ) |
#include <utils.h>
Dump a block of data to stdio and show in ASCII and hex.
fromptr | Pointer to data to display |
len | Number of bytes to display |
void ShowIP4 | ( | const IPADDR4 | ia | ) |
#include <utils.h>
Dump an IPv4 address in ASCII IP string format to stdio.
ia | IPv4 address to display |
|
inline |
#include <utils.h>
Dump an IPv6 address in ASCII IP string format to stdio.
ia | IPv6 address to display |
|
inline |
void ShowMac | ( | const MACADR * | ma | ) |
void ShowRingData | ( | const uint8_t * | ringBuf, |
uint32_t | bufLen, | ||
uint32_t | start, | ||
uint32_t | end, | ||
const char * | indent = NULL ) |
#include <utils.h>
Dump part of a ring buffer to stdio.
ringBuf | Pointer to ring buffer data |
bufLen | Total length of ring buffer |
start | Start offset in ring buffer |
end | End offset in ring buffer |
indent | Optional indentation string for formatting (can be NULL) |
int snShowIP4 | ( | char * | buf, |
size_t | maxlen, | ||
const IPADDR4 | ia ) |
#include <utils.h>
Dump an IPv4 address in ASCII IP string format to character buffer.
buf | Buffer to write IP address string to |
maxlen | Maximum length of buffer |
ia | IPv4 address to convert |
|
inline |
#include <utils.h>
Dump an IPv6 address in ASCII IP string format to character buffer.
buf | Buffer to write IP address string to |
maxlen | Maximum length of buffer |
ia | IPv6 address to convert |
|
inline |
void snShowMac | ( | char * | buf, |
size_t | maxlen, | ||
const MACADR * | ma ) |
void sShowCounters | ( | char * | buffer, |
int | slen ) |
#include <utils.h>
Dump all system counters to a memory buffer.
buffer | Pointer to buffer to store counter information |
slen | Size of the buffer in bytes |
BOOL ValidIPv4 | ( | const char * | p | ) |
#include <utils.h>
Validate if a string contains a valid IPv4 address.
p | Pointer to null-terminated string to validate |