Skip to content

Commit

Permalink
Turn on additional compiler flags
Browse files Browse the repository at this point in the history
  • Loading branch information
tdjCisco committed Nov 19, 2018
1 parent 6c56314 commit ce19004
Show file tree
Hide file tree
Showing 16 changed files with 105 additions and 103 deletions.
10 changes: 5 additions & 5 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -5630,7 +5630,7 @@ _ACEOF


cat >>confdefs.h <<\_ACEOF
#define JOY_MICRO_VERSION 0
#define JOY_MICRO_VERSION 1
_ACEOF


Expand All @@ -5640,7 +5640,7 @@ _ACEOF
# For each shared library
#
#joy.so age for version
JOY_LIBRARY_VERSION="4:0:1"
JOY_LIBRARY_VERSION="4:0:0"


case `pwd` in
Expand Down Expand Up @@ -12417,10 +12417,10 @@ CC="$lt_save_CC"



tmp_am_cflags="-Werror -Wall -fPIC -fPIE -D_FORTIFY_SOURCE=2 -O"
tmp_am_cflags_no_cast_qual="-Werror -Wall -Wbad-function-cast -Wcast-align -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wendif-labels -Wformat -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wimport -Winline -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmissing-noreturn -Wmultichar -Wnested-externs -Wnonnull -Wparentheses -Wpointer-arith -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstrict-aliasing -Wstrict-prototypes -Wswitch -Wswitch-default -Wswitch-enum -Wsystem-headers -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wunused-but-set-variable -Wwrite-strings -Wno-pointer-sign -Wextra -fPIC -fPIE -D_FORTIFY_SOURCE=2 -O"
#tmp_am_cflags="-Werror -Wall -fPIC -fPIE -D_FORTIFY_SOURCE=2 -O"
tmp_am_cflags_no_cast_qual="-Werror -Wall -Wbad-function-cast -Wcast-align -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wendif-labels -Wformat -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wimport -Winline -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmissing-noreturn -Wmultichar -Wnested-externs -Wnonnull -Wparentheses -Wpointer-arith -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstrict-aliasing -Wstrict-prototypes -Wswitch -Wswitch-default -Wswitch-enum -Wsystem-headers -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wunused-but-set-variable -Wwrite-strings -Wno-pointer-sign -Wextra -fPIC -fPIE -D_FORTIFY_SOURCE=2 -O -D_GNU_SOURCE"

#tmp_am_cflags="-Werror -Wall -Wbad-function-cast -Wcast-align -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wendif-labels -Wformat -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wimport -Winline -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmissing-noreturn -Wmultichar -Wnested-externs -Wnonnull -Wparentheses -Wpointer-arith -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstrict-aliasing -Wstrict-prototypes -Wswitch -Wswitch-default -Wswitch-enum -Wsystem-headers -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wunused-but-set-variable -Wwrite-strings -Wno-pointer-sign -Wextra -Wcast-qual -fPIC -fPIE -D_FORTIFY_SOURCE=2 -O"
tmp_am_cflags="-Werror -Wall -Wbad-function-cast -Wcast-align -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wendif-labels -Wformat -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wimport -Winline -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmissing-noreturn -Wmultichar -Wnested-externs -Wnonnull -Wparentheses -Wpointer-arith -Wreturn-type -Wsequence-point -Wsign-compare -Wstrict-aliasing -Wstrict-prototypes -Wswitch -Wswitch-default -Wswitch-enum -Wsystem-headers -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wunused-but-set-variable -Wwrite-strings -Wno-pointer-sign -Wextra -Wcast-qual -fPIC -fPIE -D_FORTIFY_SOURCE=2 -O -D_GNU_SOURCE"

#
# Disabling cast-qual Support
Expand Down
8 changes: 4 additions & 4 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#
m4_define([joy_major_version], [4])
m4_define([joy_minor_version], [0])
m4_define([joy_micro_version], [0])
m4_define([joy_micro_version], [1])


m4_define([joy_version],[joy_major_version.joy_minor_version.joy_micro_version])
Expand Down Expand Up @@ -52,10 +52,10 @@ AC_SUBST(JOY_LIBRARY_VERSION)

LT_INIT

tmp_am_cflags="-Werror -Wall -fPIC -fPIE -D_FORTIFY_SOURCE=2 -O"
tmp_am_cflags_no_cast_qual="-Werror -Wall -Wbad-function-cast -Wcast-align -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wendif-labels -Wformat -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wimport -Winline -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmissing-noreturn -Wmultichar -Wnested-externs -Wnonnull -Wparentheses -Wpointer-arith -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstrict-aliasing -Wstrict-prototypes -Wswitch -Wswitch-default -Wswitch-enum -Wsystem-headers -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wunused-but-set-variable -Wwrite-strings -Wno-pointer-sign -Wextra -fPIC -fPIE -D_FORTIFY_SOURCE=2 -O"
#tmp_am_cflags="-Werror -Wall -fPIC -fPIE -D_FORTIFY_SOURCE=2 -O"
tmp_am_cflags_no_cast_qual="-Werror -Wall -Wbad-function-cast -Wcast-align -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wendif-labels -Wformat -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wimport -Winline -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmissing-noreturn -Wmultichar -Wnested-externs -Wnonnull -Wparentheses -Wpointer-arith -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstrict-aliasing -Wstrict-prototypes -Wswitch -Wswitch-default -Wswitch-enum -Wsystem-headers -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wunused-but-set-variable -Wwrite-strings -Wno-pointer-sign -Wextra -fPIC -fPIE -D_FORTIFY_SOURCE=2 -O -D_GNU_SOURCE"

#tmp_am_cflags="-Werror -Wall -Wbad-function-cast -Wcast-align -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wendif-labels -Wformat -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wimport -Winline -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmissing-noreturn -Wmultichar -Wnested-externs -Wnonnull -Wparentheses -Wpointer-arith -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wstrict-aliasing -Wstrict-prototypes -Wswitch -Wswitch-default -Wswitch-enum -Wsystem-headers -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wunused-but-set-variable -Wwrite-strings -Wno-pointer-sign -Wextra -Wcast-qual -fPIC -fPIE -D_FORTIFY_SOURCE=2 -O"
tmp_am_cflags="-Werror -Wall -Wbad-function-cast -Wcast-align -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wendif-labels -Wformat -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wimport -Winline -Winvalid-pch -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmissing-noreturn -Wmultichar -Wnested-externs -Wnonnull -Wparentheses -Wpointer-arith -Wreturn-type -Wsequence-point -Wsign-compare -Wstrict-aliasing -Wstrict-prototypes -Wswitch -Wswitch-default -Wswitch-enum -Wsystem-headers -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value -Wunused-variable -Wunused-but-set-variable -Wwrite-strings -Wno-pointer-sign -Wextra -Wcast-qual -fPIC -fPIE -D_FORTIFY_SOURCE=2 -O -D_GNU_SOURCE"

#
# Disabling cast-qual Support
Expand Down
16 changes: 8 additions & 8 deletions src/anon.c
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ void anon_http_ctx_cleanup (void)
* \param len length of the bytes to print
* \return none
*/
void zprintf_nbytes (zfile f, char *s, size_t len) {
void zprintf_nbytes (zfile f, const char *s, size_t len) {
char tmp[1024];

if (len >= 1024) {
Expand Down Expand Up @@ -577,7 +577,7 @@ void zprintf_anon_nbytes (zfile f, size_t len) {
* \return 0 is not special
* \return 1 is special
*/
int is_special (char *ptr) {
int is_special (const char *ptr) {
char c = *ptr;
return (c=='?')||(c=='&')||(c=='/')||(c=='-')||(c=='\\')||(c=='_')||(c=='.')||(c=='=')||(c==';')||(c==0); // ||(c==' ')||(c=='@')||(c=='.');
}
Expand All @@ -589,7 +589,7 @@ int is_special (char *ptr) {
* \param text the uri string
* \return none
*/
void anon_print_uri(zfile f, struct matches *matches, char *text) {
void anon_print_uri(zfile f, struct matches *matches, const char *text) {
unsigned int i;

if (matches->count == 0) {
Expand Down Expand Up @@ -623,7 +623,7 @@ void anon_print_uri(zfile f, struct matches *matches, char *text) {
* \return o is not special
* \return 1 is special
*/
int email_special_chars (char *ptr) {
int email_special_chars (const char *ptr) {
char c = *ptr;
return (c==0)||(c==' ')||(c=='@')||(c==',')||(c=='\t')||(c=='"')||(c=='\'');
}
Expand All @@ -638,7 +638,7 @@ int email_special_chars (char *ptr) {
* \param transform transform to use for anonymization
* \return none
*/
void anon_print_string (zfile f, struct matches *matches, char *text,
void anon_print_string (zfile f, struct matches *matches, const char *text,
char_selector selector, string_transform transform) {
unsigned int i;
joy_status_e err;
Expand All @@ -656,7 +656,7 @@ void anon_print_string (zfile f, struct matches *matches, char *text,
/*
* matching and special
*/
void *start = text + matches->start[i];
const void *start = text + matches->start[i];
size_t len = matches->stop[i] - matches->start[i] + 1;

if (transform) {
Expand Down Expand Up @@ -690,7 +690,7 @@ void anon_print_string (zfile f, struct matches *matches, char *text,
* \param text string to print out
* \return none
*/
void anon_print_uri_pseudonym (zfile f, struct matches *matches, char *text) {
void anon_print_uri_pseudonym (zfile f, struct matches *matches, const char *text) {
anon_print_string(f, matches, text, is_special, anon_string);
return;
}
Expand All @@ -705,7 +705,7 @@ void anon_print_uri_pseudonym (zfile f, struct matches *matches, char *text) {
* \param transform transform to use for anonymization
* \return none
*/
void zprintf_usernames (zfile f, struct matches *matches, char *text,
void zprintf_usernames (zfile f, struct matches *matches, const char *text,
char_selector selector, string_transform transform) {
unsigned int i;
char tmp[1024];
Expand Down
10 changes: 5 additions & 5 deletions src/dhcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ void dhcp_update(dhcp_t *dhcp,
unsigned int data_len,
unsigned int report_dhcp)
{
const unsigned char *ptr = (unsigned char *)data;
const unsigned char *ptr = (const unsigned char *)data;
dhcp_message_t *msg = NULL;
const unsigned char magic_cookie[] = {0x63, 0x82, 0x53, 0x63};

Expand Down Expand Up @@ -571,16 +571,16 @@ void dhcp_print_json(const dhcp_t *d1,
*
* \return pointer to the beginning of DHCP message data, NULL if fail
*/
static unsigned char* dhcp_skip_packet_udp_header(const unsigned char *packet_data,
static const unsigned char* dhcp_skip_packet_udp_header(const unsigned char *packet_data,
unsigned int packet_len,
unsigned int *size_payload) {
const struct ip_hdr *ip = NULL;
unsigned int ip_hdr_len = 0;
unsigned int udp_hdr_len = 8;
unsigned char *payload = NULL;
const unsigned char *payload = NULL;

/* define/compute ip header offset */
ip = (struct ip_hdr*)(packet_data + ETHERNET_HDR_LEN);
ip = (const struct ip_hdr*)(packet_data + ETHERNET_HDR_LEN);
ip_hdr_len = ip_hdr_length(ip);
if (ip_hdr_len < 20) {
joy_log_err("invalid ip header of len %d", ip_hdr_len);
Expand All @@ -594,7 +594,7 @@ static unsigned char* dhcp_skip_packet_udp_header(const unsigned char *packet_da
}

/* define/compute udp payload (segment) offset */
payload = (unsigned char *)(packet_data + ETHERNET_HDR_LEN + ip_hdr_len + udp_hdr_len);
payload = (const unsigned char *)(packet_data + ETHERNET_HDR_LEN + ip_hdr_len + udp_hdr_len);

/* compute udp payload (segment) size */
*size_payload = packet_len - ETHERNET_HDR_LEN - ip_hdr_len - udp_hdr_len;
Expand Down
12 changes: 6 additions & 6 deletions src/ike.c
Original file line number Diff line number Diff line change
Expand Up @@ -4918,7 +4918,7 @@ static int ike_sa_match(ike_sa_t *init_sa, ike_sa_t *resp_sa) {
*
* \return Pointer to an IKE security association structure, or NULL if none exist.
*/
static ike_sa_t *ike_sa_get(ike_t *ike) {
static ike_sa_t *ike_sa_get(const ike_t *ike) {
int i, j;

for (i = (int)(ike->num_messages-1); i >= 0; i--) {
Expand Down Expand Up @@ -4947,8 +4947,8 @@ static ike_sa_t *ike_sa_get(ike_t *ike) {
*
* \return
*/
static void ike_process(ike_t *init,
ike_t *resp) {
static void ike_process(const ike_t *init,
const ike_t *resp) {
ike_sa_t *init_sa, *resp_sa;

if (init == NULL || resp == NULL) {
Expand Down Expand Up @@ -5093,11 +5093,11 @@ void ike_update(ike_t *ike,
void ike_print_json(const ike_t *data,
const ike_t *data_twin,
zfile f) {
ike_t *init = NULL, *resp = NULL;
const ike_t *init = NULL, *resp = NULL;
unsigned int i;

init = (ike_t*)data;
resp = (ike_t*)data_twin;
init = data;
resp = data_twin;

ike_process(init, resp);

Expand Down
16 changes: 8 additions & 8 deletions src/include/anon.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ enum anon_mode {
#define MAX_ANON_SUBNETS 256

/** prototype for character operations */
typedef int (*char_selector)(char *ptr);
typedef int (*char_selector)(const char *ptr);

/** stucture used for anonimzed subnets */
typedef struct {
Expand Down Expand Up @@ -112,21 +112,21 @@ void anon_http_ctx_cleanup(void);
void zprintf_anon_nbytes(zfile f, size_t len);

/** \brief prints out number of bytes specified */
void zprintf_nbytes(zfile f, char *s, size_t len);
void zprintf_nbytes(zfile f, const char *s, size_t len);

/** \brief prints out URI with or without anonymization depending on URI status */
void anon_print_uri(zfile f, struct matches *matches, char *text);
void anon_print_uri(zfile f, struct matches *matches, const char *text);

/** \brief finds special characters in email addresses */
int email_special_chars(char *ptr);
int email_special_chars(const char *ptr);

/** \brief determines if characters are special or not */
int is_special(char *ptr);
int is_special(const char *ptr);

/** \brief prints out a string with or without anonymization depending on matching criteria */
void anon_print_string(zfile f,
struct matches *matches,
char *text,
const char *text,
char_selector selector,
string_transform transform);

Expand All @@ -137,10 +137,10 @@ joy_status_e anon_string(const char *s, unsigned int len, char *hex, unsigned in
joy_status_e deanon_string(const char *hexinput, unsigned int len, char *s, unsigned int outlen);

/** \brief prints a URI anonymized if applicable */
void anon_print_uri_pseudonym(zfile f, struct matches *matches, char *text);
void anon_print_uri_pseudonym(zfile f, struct matches *matches, const char *text);

/** \brief prints usersnames anonymized if applicable */
void zprintf_usernames(zfile f, struct matches *matches, char *text, char_selector selector, string_transform transform);
void zprintf_usernames(zfile f, struct matches *matches, const char *text, char_selector selector, string_transform transform);

/** \brief initializes the key used for anonymization routines */
joy_status_e key_init(const char *ANON_KEYFILE);
Expand Down
2 changes: 1 addition & 1 deletion src/include/p2f.h
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ unsigned int flow_record_is_expired(joy_ctx_data *ctx, flow_record_t *record);

void remove_record_and_update_list(joy_ctx_data *ctx, flow_record_t *rec);

int process_pcap_file(char *file_name, char *filter_exp, bpf_u_int32 *net, struct bpf_program *fp);
int process_pcap_file(char *file_name, const char *filter_exp, bpf_u_int32 *net, struct bpf_program *fp);

/* flocap_stats holds high-level statistics about packets and flow
* records, for use in accounting and troubleshooting
Expand Down
12 changes: 6 additions & 6 deletions src/ipfix.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ __declspec(noreturn) void *ipfix_cts_monitor(void *ptr) {
#else
__attribute__((__noreturn__)) void *ipfix_cts_monitor(void *ptr) {
#endif
const char *tmp;
char *tmp;
uint16_t num_expired = 0;

/* satisfy compiler warning */
Expand Down Expand Up @@ -971,7 +971,7 @@ static int ipfix_loop_data_fields(const unsigned char *data_ptr,
variable_length_hdr += 1;
min_field_len = 1;
} else if (fld_len_flag == 255) {
actual_fld_len = ntohs(*(unsigned short *)(data_ptr + 1));
actual_fld_len = ntohs(*(const unsigned short *)(data_ptr + 1));
/* Fill in the variable length field in global template list */
cur_template->fields[i].variable_length = actual_fld_len;
/* RFC 7011 section 7, Figure S. */
Expand Down Expand Up @@ -1120,7 +1120,7 @@ static int ipfix_skip_idp_header(flow_record_t *ix_record,
unsigned int flow_len = ix_record->idp_len;

/* define/compute ip header offset */
ip = (struct ip_hdr*)(flow_data);
ip = (const struct ip_hdr*)(flow_data);
ip_hdr_len = ip_hdr_length(ip);
if (ip_hdr_len < IPV4_HDR_LEN) {
/*
Expand All @@ -1146,7 +1146,7 @@ static int ipfix_skip_idp_header(flow_record_t *ix_record,
return 1;
}
/* define/compute icmp payload (segment) offset */
*payload = (unsigned char *)(flow_data + ip_hdr_len + icmp_hdr_len);
*payload = (const unsigned char *)(flow_data + ip_hdr_len + icmp_hdr_len);

/* compute icmp payload (segment) size */
*size_payload = flow_len - ip_hdr_len - icmp_hdr_len;
Expand All @@ -1160,15 +1160,15 @@ static int ipfix_skip_idp_header(flow_record_t *ix_record,
return 1;
}
/* define/compute tcp payload (segment) offset */
*payload = (unsigned char *)(flow_data + ip_hdr_len + tcp_hdr_len);
*payload = (const unsigned char *)(flow_data + ip_hdr_len + tcp_hdr_len);

/* compute tcp payload (segment) size */
*size_payload = flow_len - ip_hdr_len - tcp_hdr_len;
} else if (proto == IPPROTO_UDP) {
unsigned int udp_hdr_len = 8;

/* define/compute udp payload (segment) offset */
*payload = (unsigned char *)(flow_data + ip_hdr_len + udp_hdr_len);
*payload = (const unsigned char *)(flow_data + ip_hdr_len + udp_hdr_len);

/* compute udp payload (segment) size */
*size_payload = flow_len - ip_hdr_len - udp_hdr_len;
Expand Down
8 changes: 4 additions & 4 deletions src/joy.c
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,7 @@ int process_directory_of_files (char *input_directory, char *output_filename) {
flow_record_list_init(&main_ctx);
flocap_stats_timer_init(&main_ctx);

tmp_ret = process_pcap_file(pcap_filename, (char*)filter_exp, &net, &fp);
tmp_ret = process_pcap_file(pcap_filename, filter_exp, &net, &fp);
if (tmp_ret < 0) {
closedir(dir);
return tmp_ret;
Expand Down Expand Up @@ -1183,7 +1183,7 @@ int process_multiple_input_files (char *input_filename, char *output_filename, i
}

/* process the file */
tmp_ret = process_pcap_file(input_filename, (char*)filter_exp, &net, &fp);
tmp_ret = process_pcap_file(input_filename, filter_exp, &net, &fp);
if (tmp_ret < 0) {
return tmp_ret;
}
Expand Down Expand Up @@ -1220,7 +1220,7 @@ int process_single_input_file (char *input_filename, char *output_filename) {
/* print configuration */
config_print_json(main_ctx.output, glb_config);

tmp_ret = process_pcap_file(input_filename, (char*)filter_exp, &net, &fp);
tmp_ret = process_pcap_file(input_filename, filter_exp, &net, &fp);
return tmp_ret;
}

Expand Down Expand Up @@ -1687,7 +1687,7 @@ int main (int argc, char **argv) {
* \return -3 could not install filter
* \return 0 success
*/
int process_pcap_file (char *file_name, char *filtr_exp, bpf_u_int32 *net, struct bpf_program *fp) {
int process_pcap_file (char *file_name, const char *filtr_exp, bpf_u_int32 *net, struct bpf_program *fp) {
char errbuf[PCAP_ERRBUF_SIZE];
int more = 1;

Expand Down
Loading

0 comments on commit ce19004

Please sign in to comment.