suricata
decode-mpls.c File Reference
#include "suricata-common.h"
#include "decode.h"
#include "util-unittest.h"
Include dependency graph for decode-mpls.c:

Go to the source code of this file.

Macros

#define MPLS_HEADER_LEN   4
 
#define MPLS_PW_LEN   4
 
#define MPLS_MAX_RESERVED_LABEL   15
 
#define MPLS_LABEL_IPV4   0
 
#define MPLS_LABEL_ROUTER_ALERT   1
 
#define MPLS_LABEL_IPV6   2
 
#define MPLS_LABEL_NULL   3
 
#define MPLS_LABEL(shim)   SCNtohl(shim) >> 12
 
#define MPLS_BOTTOM(shim)   ((SCNtohl(shim) >> 8) & 0x1)
 
#define MPLS_PROTO_ETHERNET_PW   0
 
#define MPLS_PROTO_IPV4   4
 
#define MPLS_PROTO_IPV6   6
 

Functions

int DecodeMPLS (ThreadVars *tv, DecodeThreadVars *dtv, Packet *p, uint8_t *pkt, uint32_t len, PacketQueue *pq)
 
void DecodeMPLSRegisterTests (void)
 

Detailed Description

Author
Jason Ish jason.nosp@m..ish.nosp@m.@emul.nosp@m.ex.c.nosp@m.om

MPLS decoder.

Definition in file decode-mpls.c.

Macro Definition Documentation

#define MPLS_BOTTOM (   shim)    ((SCNtohl(shim) >> 8) & 0x1)

Definition at line 40 of file decode-mpls.c.

Referenced by DecodeMPLS().

#define MPLS_HEADER_LEN   4

Definition at line 30 of file decode-mpls.c.

Referenced by DecodeMPLS().

#define MPLS_LABEL (   shim)    SCNtohl(shim) >> 12

Definition at line 39 of file decode-mpls.c.

Referenced by DecodeMPLS().

#define MPLS_LABEL_IPV4   0

Definition at line 34 of file decode-mpls.c.

Referenced by DecodeMPLS().

#define MPLS_LABEL_IPV6   2

Definition at line 36 of file decode-mpls.c.

Referenced by DecodeMPLS().

#define MPLS_LABEL_NULL   3

Definition at line 37 of file decode-mpls.c.

Referenced by DecodeMPLS().

#define MPLS_LABEL_ROUTER_ALERT   1

Definition at line 35 of file decode-mpls.c.

Referenced by DecodeMPLS().

#define MPLS_MAX_RESERVED_LABEL   15

Definition at line 32 of file decode-mpls.c.

Referenced by DecodeMPLS().

#define MPLS_PROTO_ETHERNET_PW   0

Definition at line 43 of file decode-mpls.c.

Referenced by DecodeMPLS().

#define MPLS_PROTO_IPV4   4

Definition at line 44 of file decode-mpls.c.

Referenced by DecodeMPLS().

#define MPLS_PROTO_IPV6   6

Definition at line 45 of file decode-mpls.c.

Referenced by DecodeMPLS().

#define MPLS_PW_LEN   4

Definition at line 31 of file decode-mpls.c.

Referenced by DecodeMPLS().

Function Documentation

void DecodeMPLSRegisterTests ( void  )

Definition at line 323 of file decode-mpls.c.

References UtRegisterTest().

Here is the call graph for this function: