diff options
author | Daniele De Lorenzi <daniele.delorenzi@fastnetserv.net> | 2018-12-20 11:04:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-20 11:04:03 +0100 |
commit | 2aea4da9adc3ba87346d01d20bd815004016db4f (patch) | |
tree | 91c94e1645640407f32e0cf5b1097444f6f26271 /src/lib/protocols/diameter.c | |
parent | 3b1047b0c8136b85010554ac31f7845c68b5898b (diff) | |
parent | d3be349fa0d03477be1c84fad23fcc37df9bcf67 (diff) |
Merge pull request #10 from ntop/dev
Repo sync
Diffstat (limited to 'src/lib/protocols/diameter.c')
-rw-r--r-- | src/lib/protocols/diameter.c | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/src/lib/protocols/diameter.c b/src/lib/protocols/diameter.c index 24317f498..7fb443c34 100644 --- a/src/lib/protocols/diameter.c +++ b/src/lib/protocols/diameter.c @@ -1,8 +1,7 @@ /* - * aimini.c + * diameter.c * * Copyright (C) 2018 - ntop.org - * Written by Michele Campus - <campus@ntop.org> * * This file is part of nDPI, an open source deep packet inspection * library based on the OpenDPI and PACE technology by ipoque GmbH @@ -19,22 +18,22 @@ * * You should have received a copy of the GNU Lesser General Public License * along with nDPI. If not, see <http://www.gnu.org/licenses/>. - * + * + * Based on code of: + * Michele Campus - <campus@ntop.org> */ #include "ndpi_protocol_ids.h" -#ifdef NDPI_PROTOCOL_DIAMETER - #define NDPI_CURRENT_PROTO NDPI_PROTOCOL_DIAMETER #include "ndpi_api.h" // Header Flags possibile values -#define REQUEST 0X80 -#define PROXYABLE 0X40 -#define ERROR 0X20 -#define RETRASM 0X10 +#define DIAMETER_REQUEST 0X80 +#define DIAMETER_PROXYABLE 0X40 +#define DIAMETER_ERROR 0X20 +#define DIAMETER_RETRASM 0X10 typedef enum { AC = 271, @@ -73,10 +72,10 @@ int is_diameter(struct ndpi_packet_struct *packet, int size_payload) // check if the packet is diameter if(diameter->version == 0x01 && - (diameter->flags == REQUEST || - diameter->flags == PROXYABLE || - diameter->flags == ERROR || - diameter->flags == RETRASM)) { + (diameter->flags == DIAMETER_REQUEST || + diameter->flags == DIAMETER_PROXYABLE || + diameter->flags == DIAMETER_ERROR || + diameter->flags == DIAMETER_RETRASM)) { u_int16_t com_code = diameter->com_code[2] + (diameter->com_code[1] << 8) + (diameter->com_code[0] << 8); @@ -128,5 +127,3 @@ void init_diameter_dissector(struct ndpi_detection_module_struct *ndpi_struct, u *id += 1; } -#endif /* NDPI_PROTOCOL_DIAMETER */ - |