TSG-13355 Steering Service搭建Project框架
This commit is contained in:
15
common/include/bfd.h
Normal file
15
common/include/bfd.h
Normal file
@@ -0,0 +1,15 @@
|
||||
#ifndef _BFD_H
|
||||
#define _BFD_H
|
||||
|
||||
#ifdef __cpluscplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
// TODO
|
||||
|
||||
#ifdef __cpluscplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
30
common/include/conntable.h
Normal file
30
common/include/conntable.h
Normal file
@@ -0,0 +1,30 @@
|
||||
#ifndef _CONNTABLE_H
|
||||
#define _CONNTABLE_H
|
||||
|
||||
#ifdef __cpluscplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
struct tuple4
|
||||
{
|
||||
/* data */
|
||||
};
|
||||
|
||||
struct conntable;
|
||||
|
||||
struct conntable *conntable_create();
|
||||
void conntable_destory(struct conntable *table);
|
||||
|
||||
void conntable_add(struct conntable *table, uint64_t streamid, void *val);
|
||||
void conntable_del(struct conntable *table, uint64_t streamid);
|
||||
void *conntable_search_by_streamid(struct conntable *table, uint64_t streamid);
|
||||
void *conntable_search_by_tuple4(struct conntable *table, struct tuple4 *tuplekey);
|
||||
|
||||
#ifdef __cpluscplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
27
common/include/log.h
Normal file
27
common/include/log.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#ifndef _LOG_H
|
||||
#define _LOG_H
|
||||
|
||||
#ifdef __cpluscplus
|
||||
extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#define LOG_DEBUG(format, ...) \
|
||||
{ \
|
||||
fprintf(stdout, format "\n", ##__VA_ARGS__); \
|
||||
fflush(stdout); \
|
||||
}
|
||||
|
||||
#define LOG_ERROR(format, ...) \
|
||||
{ \
|
||||
fprintf(stderr, format "\n", ##__VA_ARGS__); \
|
||||
fflush(stderr); \
|
||||
}
|
||||
|
||||
#ifdef __cpluscplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
1316
common/include/uthash.h
Normal file
1316
common/include/uthash.h
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user