diff options
4 files changed, 92 insertions, 2 deletions
diff --git a/include/libnetfilter_conntrack/libnetfilter_conntrack.h b/include/libnetfilter_conntrack/libnetfilter_conntrack.h index ec85066..f77d273 100644 --- a/include/libnetfilter_conntrack/libnetfilter_conntrack.h +++ b/include/libnetfilter_conntrack/libnetfilter_conntrack.h @@ -630,6 +630,12 @@ enum ip_conntrack_status { /* Be liberal in window checking */ #define IP_CT_TCP_FLAG_BE_LIBERAL 0x08 +/* WARNING: do not use these constants in new applications, we keep them here + * to avoid breaking backward compatibility. */ +#define NFCT_DIR_ORIGINAL 0 +#define NFCT_DIR_REPLY 1 +#define NFCT_DIR_MAX NFCT_DIR_REPLY+1 + #ifdef __cplusplus } #endif diff --git a/include/libnetfilter_conntrack/libnetfilter_conntrack_icmp.h b/include/libnetfilter_conntrack/libnetfilter_conntrack_icmp.h index 35e5a05..33dcf0d 100644 --- a/include/libnetfilter_conntrack/libnetfilter_conntrack_icmp.h +++ b/include/libnetfilter_conntrack/libnetfilter_conntrack_icmp.h @@ -8,6 +8,25 @@ #ifndef _LIBNETFILTER_CONNTRACK_ICMP_H_ #define _LIBNETFILTER_CONNTRACK_ICMP_H_ -#warning "Please, remove libnetfilter_conntrack_icmp.h from your includes!" +#ifdef __cplusplus +extern "C" { +#endif + +/* WARNING: do not use these flags in your new applications, they are obsolete + * and we keep them here to avoid breaking backward compatibility. */ +enum icmp_flags { + ICMP_TYPE_BIT = 0, + ICMP_TYPE = (1 << ICMP_TYPE_BIT), + + ICMP_CODE_BIT = 1, + ICMP_CODE = (1 << ICMP_CODE_BIT), + + ICMP_ID_BIT = 2, + ICMP_ID = (1 << ICMP_ID_BIT) +}; + +#ifdef __cplusplus +} +#endif #endif diff --git a/include/libnetfilter_conntrack/libnetfilter_conntrack_tcp.h b/include/libnetfilter_conntrack/libnetfilter_conntrack_tcp.h index 1fd5ef1..35eb114 100644 --- a/include/libnetfilter_conntrack/libnetfilter_conntrack_tcp.h +++ b/include/libnetfilter_conntrack/libnetfilter_conntrack_tcp.h @@ -28,6 +28,37 @@ enum tcp_state { TCP_CONNTRACK_IGNORE }; +/* WARNING: do not use these flags in your new applications, they are obsolete + * and we keep them here to avoid breaking backward compatibility. */ +enum tcp_flags { + TCP_ORIG_SPORT_BIT = 0, + TCP_ORIG_SPORT = (1 << TCP_ORIG_SPORT_BIT), + + TCP_ORIG_DPORT_BIT = 1, + TCP_ORIG_DPORT = (1 << TCP_ORIG_DPORT_BIT), + + TCP_REPL_SPORT_BIT = 2, + TCP_REPL_SPORT = (1 << TCP_REPL_SPORT_BIT), + + TCP_REPL_DPORT_BIT = 3, + TCP_REPL_DPORT = (1 << TCP_REPL_DPORT_BIT), + + TCP_MASK_SPORT_BIT = 4, + TCP_MASK_SPORT = (1 << TCP_MASK_SPORT_BIT), + + TCP_MASK_DPORT_BIT = 5, + TCP_MASK_DPORT = (1 << TCP_MASK_DPORT_BIT), + + TCP_STATE_BIT = 6, + TCP_STATE = (1 << TCP_STATE_BIT), + + TCP_EXPTUPLE_SPORT_BIT = 7, + TCP_EXPTUPLE_SPORT = (1 << TCP_EXPTUPLE_SPORT_BIT), + + TCP_EXPTUPLE_DPORT_BIT = 8, + TCP_EXPTUPLE_DPORT = (1 << TCP_EXPTUPLE_DPORT_BIT) +}; + #ifdef __cplusplus } #endif diff --git a/include/libnetfilter_conntrack/libnetfilter_conntrack_udp.h b/include/libnetfilter_conntrack/libnetfilter_conntrack_udp.h index 62ad87b..b788aa4 100644 --- a/include/libnetfilter_conntrack/libnetfilter_conntrack_udp.h +++ b/include/libnetfilter_conntrack/libnetfilter_conntrack_udp.h @@ -8,6 +8,40 @@ #ifndef _LIBNETFILTER_CONNTRACK_UDP_H_ #define _LIBNETFILTER_CONNTRACK_UDP_H_ -#warning "Please, remove libnetfilter_conntrack_udp.h from your includes!" +#ifdef __cplusplus +extern "C" { +#endif + +/* WARNING: do not use these flags in your new applications, they are obsolete + * and we keep them here to avoid breaking backward compatibility. */ +enum udp_flags { + UDP_ORIG_SPORT_BIT = 0, + UDP_ORIG_SPORT = (1 << UDP_ORIG_SPORT_BIT), + + UDP_ORIG_DPORT_BIT = 1, + UDP_ORIG_DPORT = (1 << UDP_ORIG_DPORT_BIT), + + UDP_REPL_SPORT_BIT = 2, + UDP_REPL_SPORT = (1 << UDP_REPL_SPORT_BIT), + + UDP_REPL_DPORT_BIT = 3, + UDP_REPL_DPORT = (1 << UDP_REPL_DPORT_BIT), + + UDP_MASK_SPORT_BIT = 4, + UDP_MASK_SPORT = (1 << UDP_MASK_SPORT_BIT), + + UDP_MASK_DPORT_BIT = 5, + UDP_MASK_DPORT = (1 << UDP_MASK_DPORT_BIT), + + UDP_EXPTUPLE_SPORT_BIT = 6, + UDP_EXPTUPLE_SPORT = (1 << UDP_EXPTUPLE_SPORT_BIT), + + UDP_EXPTUPLE_DPORT_BIT = 7, + UDP_EXPTUPLE_DPORT = (1 << UDP_EXPTUPLE_DPORT_BIT) +}; + +#ifdef __cplusplus +} +#endif #endif |