#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <string.h>
#include <stdarg.h>
#include "strings_utils.h"
Go to the source code of this file.
Functions | |
void | conversion_logging_service (int dbg, char *logfile, int(*logger)(const char *file, const char *fmt,...)) |
Assign a logging service to the conversion module. More... | |
char | int_to_char (unsigned char c) |
Convert an integer (between 0 and 15 included) into the corresponding hexa character (from 0 to F). More... | |
unsigned char | char_to_int (char c) |
Convert a given hexa character (from '0' to 'F') into the corresponding integer value (from 0 to 15 included). More... | |
unsigned char * | haddr_to_hexa (char *haddr, int *length) |
Convert a hardware address in standard ':' notation into its RAW representation. More... | |
unsigned long int | get_network_ip (char *ip) |
Convert IP address in standard numbers-and-dots notation into binary data (4 bytes in network byte order). More... | |
char * | get_doted_ip (unsigned long int ip) |
Convert IP address in binary representation (4 bytes in network byte order) into standard numbers-and-dots notation. More... | |
int | uint32_to_network_byte_order (char *buffer_in, char *buffer_out, int len_out) |
Convert a list of UINT32 into a succession of 4 bytes integers in network byte order. More... | |
int | ip_to_network_byte_order (char *buffer_in, char *buffer_out, int len_out) |
Convert a list of IP addresses into a succession of 4 bytes integers in network byte order. More... | |
int | hexa_to_binary (char *buffer_in, char *buffer_out, int len_out) |
Convert hexa representation into bytes. More... | |
int | ascii_to_binary (char *buffer_in, char *buffer_out, int len_in, int len_out) |
Convert ASCII representation into bytes. More... | |
int | uint16_to_network_byte_order (char *buffer_in, char *buffer_out, int len_out) |
Convert a list of UINT16 into a succession of 2 bytes integers in network byte order. More... | |
int | raw_ips_to_string (unsigned char *buffin, char *buffout, int lenin, int lenout) |
Convert a list of RAW IP addresses (4 bytes in network IP order) into a string representation (standard numbers-and-dots notation separated by characters ':'). More... | |
void | radius2mydns (char *radius, char *mydns, int mydns_size) |
Definition in file conversion.h.
|
Convert ASCII representation into bytes.
Definition at line 523 of file conversion.c. References debug, log_file, and my_syslog(). Referenced by add_option_to_profile(), and context2profile(). |
|
Convert a given hexa character (from '0' to 'F') into the corresponding integer value (from 0 to 15 included).
Definition at line 106 of file conversion.c. Referenced by haddr_to_hexa(), and hexa_to_binary(). |
|
Assign a logging service to the conversion module.
Definition at line 48 of file conversion.c. References debug, log_file, and my_syslog. Referenced by main(). |
|
Convert IP address in binary representation (4 bytes in network byte order) into standard numbers-and-dots notation.
Definition at line 214 of file conversion.c. Referenced by create_socket(), packet_dump(), and raw_ips_to_string(). |
|
Convert IP address in standard numbers-and-dots notation into binary data (4 bytes in network byte order).
Definition at line 196 of file conversion.c. Referenced by ip_to_network_byte_order(). |
|
Convert a hardware address in standard ':' notation into its RAW representation.
Definition at line 155 of file conversion.c. References char_to_int(), debug, log_file, and my_syslog(). |
|
Convert hexa representation into bytes.
Definition at line 455 of file conversion.c. References char_to_int(), log_file, and my_syslog(). Referenced by add_option_to_profile(), and context2profile(). |
|
Convert an integer (between 0 and 15 included) into the corresponding hexa character (from 0 to F).
Definition at line 74 of file conversion.c. Referenced by packet_dump(), packets_get_chaddr(), and packets_get_chaddr_no_separator(). |
|
Convert a list of IP addresses into a succession of 4 bytes integers in network byte order.
Definition at line 370 of file conversion.c. References debug, get_network_ip(), log_file, and my_syslog(). Referenced by add_option_to_profile(), and context2profile(). |
|
Convert a list of RAW IP addresses (4 bytes in network IP order) into a string representation (standard numbers-and-dots notation separated by characters ':').
Definition at line 236 of file conversion.c. References get_doted_ip(). |
|
Convert a list of UINT16 into a succession of 2 bytes integers in network byte order.
Definition at line 575 of file conversion.c. References debug, log_file, and my_syslog(). Referenced by add_option_to_profile(), and context2profile(). |
|
Convert a list of UINT32 into a succession of 4 bytes integers in network byte order.
Definition at line 274 of file conversion.c. References debug, log_file, and my_syslog(). Referenced by add_option_to_profile(), and context2profile(). |