#include "net\compiler.h"
Functions | |
| void | base64Encode (char *out, char *in, BYTE inlen) |
| BYTE | btohexa_high (BYTE b) |
| BYTE | btohexa_low (BYTE b) |
| WORD | CalcIPBufferChecksum (WORD len) |
| WORD | CalcIPChecksum (BYTE *buffer, WORD len) |
| BYTE | getHexNibble (BYTE c) |
| BYTE | hextob (char *s, BYTE *c) |
| void | memclr (void *dest, WORD size) |
| BOOL | strBeginsWithIC (char *strRam, ROM char *strRom) |
| BYTE | strcmpee2ram (char *strRam, WORD strEe) |
| BYTE | strcpyee2ram (char *strDst, WORD strSrc, BYTE len) |
| BYTE | strcpyram2ee (WORD strDst, char *strSrc, BYTE len) |
| DWORD | swapl (DWORD v) |
| WORD | swaps (WORD v) |
| void base64Encode | ( | char * | out, | |
| char * | in, | |||
| BYTE | inlen | |||
| ) |
Encode given ascii characters to base64 6-bit characters, adding padding characters where required
| out | Buffer where output is written to | |
| in | Input ascii string | |
| inlen | Length of input ascii string |
Convert the upper nibble (upper 4 bits) to an ASCII character.
| b | An ascii byte (always uppercase) between '0'-'9' or 'A'-'F' that corresponds to the upper 4 bits of the input byte. ex: b = 0xAE, btohexa_high() returns 'A' |
| b | An ascii byte (always uppercase) between '0'-'9' or 'A'-'F' that corresponds to the lower 4 bits of the input byte. ex: b = 0xAE, btohexa_low() returns 'E' |
This function performs checksum calculation in MAC buffer itself.
| len | Total number of bytes to calculate checksum for |
Get the hex value for the given alpha numrical character. The returned value will be from 0 - 15. If the given byte is not a alphe numerical value, 0xff is returned!
Converts the given 2 character hex string to a byte value. Only the first two character of the given string is checked. No NULL terminating character is required.
| s | Input string. First two characters of string must contain hex string. For example "8F" or "8f" | |
| c | Will contain the byte representation of the given string on return. |
| void memclr | ( | void * | dest, | |
| WORD | size | |||
| ) |
Fills the given number of bytes in the given array with 0
| dest | Pointer to memory area in RAM that has to be set to 0 | |
| size | Number of consecutive bytes to set to 0 |
| BOOL strBeginsWithIC | ( | char * | strRam, | |
| ROM char * | strRom | |||
| ) |
Test if given string in RAM begins with given ROM string, and Ignores Case. The ROM string has to be in upper case.
| strRam | Pointer to string contained in RAM. This tring does not have to be NULL terminated. | |
| strRom | Pointer to null terminated string contained in ROM |
Compare two strings.
| strRam | Pointer to null terminated string contained in RAM | |
| strEe | Address (offset) in EEPROM of null terminated string |
Copies the source string (in EEPROM) to the given destination in buffer in RAM. Characters in strSrc are copied up to, and including, the terminating null character strSrc.
| strDst | Pointer to RAM buffer where EEPROM string will be copied to | |
| strSrc | Source address (offset) in the EEPROM | |
| len | The maximum string length that is allowed to be written (excluding NULL terminating char). If the source string is longer then this value, the destination will be truncated with a NULL! For example, if len = 8, then that string can have a maximum of 8 characters = 8 + NULL. The destination must always have len + 1 positions available! |
Copies the source string (in RAM) to the given destination in EEPROM. Characters in strSrc are copied up to, and including, the terminating null character strSrc.
| strSrc | Pointer to null terminated Source string contained in RAM. | |
| strDst | Destination address (offset) in the EEPROM | |
| len | The maximum string length that is allowed to be written (excluding NULL terminating char). If the source string is longer then this value, the destination will be truncated with a NULL! To disable length checking, set this value to 255. For example, if len = 8, then that string can have a maximum of 8 characters = 8 + NULL. The destination must always have len + 1 positions available! |
1.5.8