Skip to content

Commit

Permalink
Merge pull request #1 from kYroL01/no_real
Browse files Browse the repository at this point in the history
No real
  • Loading branch information
kYroL01 committed Jun 29, 2015
2 parents 276a35d + 32cdefb commit 83d46d0
Show file tree
Hide file tree
Showing 145 changed files with 622 additions and 621 deletions.
2 changes: 1 addition & 1 deletion example/ndpiReader.c
Original file line number Diff line number Diff line change
Expand Up @@ -977,7 +977,7 @@ static unsigned int packet_processing(u_int16_t thread_id,
flow->detection_completed = 1;

if((flow->detected_protocol == NDPI_PROTOCOL_UNKNOWN) && (ndpi_flow->num_stun_udp_pkts > 0))
ndpi_int_add_connection(ndpi_thread_info[thread_id].ndpi_struct, ndpi_flow, NDPI_PROTOCOL_STUN, NDPI_REAL_PROTOCOL);
ndpi_int_add_connection(ndpi_thread_info[thread_id].ndpi_struct, ndpi_flow, NDPI_PROTOCOL_STUN/* , NDPI_REAL_PROTOCOL */);

snprintf(flow->host_server_name, sizeof(flow->host_server_name), "%s", flow->ndpi_flow->host_server_name);

Expand Down
2 changes: 1 addition & 1 deletion src/include/ndpi_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ extern "C" {
* @param ndpi_struct the detection module
* @return the protocol id of the last real protocol found in the protocol history of the flow
*/
u_int16_t ndpi_detection_get_real_protocol_of_flow(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow);
/* u_int16_t ndpi_detection_get_real_protocol_of_flow(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow); */

/**
* returns true if the protocol history of the flow of the last packet given to the detection
Expand Down
2 changes: 1 addition & 1 deletion src/include/ndpi_define.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@
/**********************
* detection features *
**********************/
#define NDPI_SELECT_DETECTION_WITH_REAL_PROTOCOL ( 1 << 0 )
/* #define NDPI_SELECT_DETECTION_WITH_REAL_PROTOCOL ( 1 << 0 ) */

#define NDPI_DIRECTCONNECT_CONNECTION_IP_TICK_TIMEOUT 600
#define NDPI_IRC_CONNECTION_TIMEOUT 120
Expand Down
8 changes: 4 additions & 4 deletions src/include/ndpi_main.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ u_int32_t ndpi_bytestream_to_ipv4(const u_int8_t * str, u_int16_t max_chars_to_r

void ndpi_int_add_connection(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow,
u_int16_t detected_protocol, ndpi_protocol_type_t protocol_type);
u_int16_t detected_protocol/* , ndpi_protocol_type_t protocol_type */);


/* function to parse a packet which has line based information into a line based structure
Expand All @@ -112,11 +112,11 @@ extern void ndpi_parse_packet_line_info_any(struct ndpi_detection_module_struct
extern u_int16_t ndpi_check_for_email_address(struct ndpi_detection_module_struct *ndpi_struct, struct ndpi_flow_struct *flow, u_int16_t counter);
extern void ndpi_int_change_packet_protocol(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow,
u_int16_t detected_protocol, ndpi_protocol_type_t protocol_type);
u_int16_t detected_protocol/* , ndpi_protocol_type_t protocol_type */);
extern void ndpi_int_change_protocol(struct ndpi_detection_module_struct *ndpi_struct,
struct ndpi_flow_struct *flow,
u_int16_t detected_protocol,
ndpi_protocol_type_t protocol_type);
u_int16_t detected_protocol/* , */
/* ndpi_protocol_type_t protocol_type */);
extern void ndpi_set_proto_defaults(struct ndpi_detection_module_struct *ndpi_mod,
ndpi_protocol_breed_t protoBreed, u_int16_t protoId,
u_int16_t tcp_alias_protoId[2], u_int16_t udp_alias_protoId[2],
Expand Down
26 changes: 13 additions & 13 deletions src/include/ndpi_typedefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -469,17 +469,17 @@ typedef struct ndpi_packet_struct {

/* this is for simple read-only access to the real protocol
* used for the main loop */
u_int16_t real_protocol_read_only;
/* u_int16_t real_protocol_read_only; */

#if NDPI_PROTOCOL_HISTORY_SIZE > 1
# if NDPI_PROTOCOL_HISTORY_SIZE > 5
# error protocol stack size not supported
# endif

struct {
u_int8_t entry_is_real_protocol:5;
u_int8_t current_stack_size_minus_one:3;
}
/* struct { */
/* u_int8_t entry_is_real_protocol:5; */
/* u_int8_t current_stack_size_minus_one:3; */
/* } */
#if !defined(WIN32)
__attribute__ ((__packed__))
#endif
Expand Down Expand Up @@ -677,10 +677,10 @@ typedef struct ndpi_flow_struct {
# error protocol stack size not supported
# endif

struct {
u_int8_t entry_is_real_protocol:5;
u_int8_t current_stack_size_minus_one:3;
}
/* struct { */
/* u_int8_t entry_is_real_protocol:5; */
/* u_int8_t current_stack_size_minus_one:3; */
/* } */

#if !defined(WIN32)
__attribute__ ((__packed__))
Expand Down Expand Up @@ -836,9 +836,9 @@ typedef struct ndpi_flow_struct {
struct ndpi_id_struct *dst;
} ndpi_flow_struct_t;

typedef enum {
NDPI_REAL_PROTOCOL = 0,
NDPI_CORRELATED_PROTOCOL = 1
} ndpi_protocol_type_t;
/* typedef enum { */
/* NDPI_REAL_PROTOCOL = 0, */
/* NDPI_CORRELATED_PROTOCOL = 1 */
/* } ndpi_protocol_type_t; */

#endif/* __NDPI_TYPEDEFS_FILE__ */
Loading

0 comments on commit 83d46d0

Please sign in to comment.