27#ifndef _NETSIM_UTILITY_H_
28#define _NETSIM_UTILITY_H_
29#ifndef _CRT_SECURE_NO_DEPRECATE
30#define _CRT_SECURE_NO_DEPRECATE
32#ifndef _CRT_SECURE_NO_WARNINGS
33#define _CRT_SECURE_NO_WARNINGS
55#ifndef _NETSIM_UTILITY_CODE_
56#pragma comment(lib,"NetSim_utility.lib")
57#define NETSIM_UTILITY_EXPORT _declspec(dllimport)
59#define NETSIM_UTILITY_EXPORT _declspec(dllexport)
62#ifndef _NETSIM_UTILITY_CODE_
63#define NETSIM_UTILITY_EXPORT extern
65#define NETSIM_UTILITY_EXPORT
154#define SET_BIT(val, bitIndex) ((val) |= (1 << (bitIndex)))
155#define SET_BIT_64(val, bitIndex) ((val) |= (1i64 << (bitIndex)))
156#define CLEAR_BIT(val, bitIndex) ((val) &= ~(1 << (bitIndex)))
157#define CLEAR_BIT_64(val, bitIndex) ((val) &= ~(1i64 << (bitIndex)))
158#define TOGGLE_BIT(val, bitIndex) ((val) ^= (1 << (bitIndex)))
159#define TOGGLE_BIT_64(val, bitIndex) ((val) ^= (1i64 << (bitIndex)))
160#define BIT_IS_SET(val, bitIndex) ((val) & (1 << (bitIndex)))
161#define BIT_IS_SET_64(val, bitIndex) ((val) & (1i64 << (bitIndex)))
162#define LSHIFTCHAR(x,eposition) ((UINT8)(x << (8 - eposition)))
163#define RSHIFTCHAR(x,eposition) ((UINT8)(x >> (8 - eposition)))
165#define htonll(x) ((1==htonl(1)) ? (x) : ((uint64_t)htonl((x) & 0xFFFFFFFF) << 32) | htonl((x) >> 32))
177 double intersection[2]);
static ANIM_HANDLE handle
#define _declspec(dllexport)
This function is used to trigger the update.
UINT64 binary_to_decimal(char bin[])
void netsim_matlab_send_command(void *command, int len)
void netsim_matlab_interface_close()
void netsim_matlab_send_ascii_command(char *format,...)
struct stru_pcap_writer * PPCAP_WRITER
char * strncpy0(char *dest, const char *src, size_t size)
char * hex_to_binary(char *hex, char *bin)
struct stru_pcap_writer PCAP_WRITER
void close_pcap_file(void *pcap_handle)
FILE * open_log_file(char *filename, char *mode)
struct stru_wireshark_trace WIRESHARKTRACE
void GetTimeStr(char *date, int len)
unsigned int unsetBit(unsigned int num, int index)
struct tm get_start_time()
int isBitSet(unsigned int num, int index)
#define NETSIM_UTILITY_EXPORT
void write_to_pcap(void *handle, unsigned char *packet, unsigned int len, double *dTime)
UINT8 maskChar(UINT8 sposition, UINT8 eposition)
int fnParseOption(int count, char *arg[], char *opt)
char * get_filename_without_extension(char *filename)
unsigned int setBit(unsigned int num, int index)
void * open_pcap_file(const char *filename, char *pipename, uint32_t network)
void create_wireshark_filter(__out char *filter, __in int len, __in char *src_ip, __in char *dst_ip)
char * find_char_or_comment(const char *s, char c)
bool netsim_matlab_get_value(char *out, int outLen, char *name, char *type)
void netsim_matlab_interface_configure(char *appPath)
bool startsWith(const char *str, const char *pre)
uint64_t em_current_time()
NETSIM_UTILITY_EXPORT WIRESHARKTRACE wireshark_trace
void fnGetFilePath(char *name, char *path)
void usleep(__int64 usec)
void binary_to_hex(char *bin, char *hex)
UINT64 hex_to_decimal(char hex[])
bool find_interaction(double arg1[2], double arg2[2], double intersection[2])
int ReportLog(FILE *fp, const char *msg,...)
char * find_word(char **s)
void call_wireshark(int duration, char *filter_string)
char * lskip(const char *s)
struct stru_wireshark_trace * PWIRESHARKTRACE
int close_log_file(FILE *fp)
PPCAP_WRITER ** pcapWriterlist
void(* convert_sim_to_real_packet)(void *netsim_packet, void *pcap_handle, double dTime)