Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros
xt_sctp.h File Reference
#include <linux/types.h>

Go to the source code of this file.

Data Structures

struct  xt_sctp_flag_info
 
struct  xt_sctp_info
 

Macros

#define XT_SCTP_SRC_PORTS   0x01
 
#define XT_SCTP_DEST_PORTS   0x02
 
#define XT_SCTP_CHUNK_TYPES   0x04
 
#define XT_SCTP_VALID_FLAGS   0x07
 
#define XT_NUM_SCTP_FLAGS   4
 
#define SCTP_CHUNK_MATCH_ANY   0x01 /* Match if any of the chunk types are present */
 
#define SCTP_CHUNK_MATCH_ALL   0x02 /* Match if all of the chunk types are present */
 
#define SCTP_CHUNK_MATCH_ONLY   0x04 /* Match if these are the only chunk types present */
 
#define bytes(type)   (sizeof(type) * 8)
 
#define SCTP_CHUNKMAP_SET(chunkmap, type)
 
#define SCTP_CHUNKMAP_CLEAR(chunkmap, type)
 
#define SCTP_CHUNKMAP_IS_SET(chunkmap, type)
 
#define SCTP_CHUNKMAP_RESET(chunkmap)   memset((chunkmap), 0, sizeof(chunkmap))
 
#define SCTP_CHUNKMAP_SET_ALL(chunkmap)   memset((chunkmap), ~0U, sizeof(chunkmap))
 
#define SCTP_CHUNKMAP_COPY(destmap, srcmap)   memcpy((destmap), (srcmap), sizeof(srcmap))
 
#define SCTP_CHUNKMAP_IS_CLEAR(chunkmap)   __sctp_chunkmap_is_clear((chunkmap), ARRAY_SIZE(chunkmap))
 
#define SCTP_CHUNKMAP_IS_ALL_SET(chunkmap)   __sctp_chunkmap_is_all_set((chunkmap), ARRAY_SIZE(chunkmap))
 

Macro Definition Documentation

#define bytes (   type)    (sizeof(type) * 8)

Definition at line 38 of file xt_sctp.h.

#define SCTP_CHUNK_MATCH_ALL   0x02 /* Match if all of the chunk types are present */

Definition at line 27 of file xt_sctp.h.

#define SCTP_CHUNK_MATCH_ANY   0x01 /* Match if any of the chunk types are present */

Definition at line 26 of file xt_sctp.h.

#define SCTP_CHUNK_MATCH_ONLY   0x04 /* Match if these are the only chunk types present */

Definition at line 28 of file xt_sctp.h.

#define SCTP_CHUNKMAP_CLEAR (   chunkmap,
  type 
)
Value:
do { \
(chunkmap)[type / bytes(__u32)] &= \
~(1 << (type % bytes(__u32))); \
} while (0)

Definition at line 46 of file xt_sctp.h.

#define SCTP_CHUNKMAP_COPY (   destmap,
  srcmap 
)    memcpy((destmap), (srcmap), sizeof(srcmap))

Definition at line 64 of file xt_sctp.h.

#define SCTP_CHUNKMAP_IS_ALL_SET (   chunkmap)    __sctp_chunkmap_is_all_set((chunkmap), ARRAY_SIZE(chunkmap))

Definition at line 79 of file xt_sctp.h.

#define SCTP_CHUNKMAP_IS_CLEAR (   chunkmap)    __sctp_chunkmap_is_clear((chunkmap), ARRAY_SIZE(chunkmap))

Definition at line 67 of file xt_sctp.h.

#define SCTP_CHUNKMAP_IS_SET (   chunkmap,
  type 
)
Value:
({ \
((chunkmap)[type / bytes (__u32)] & \
(1 << (type % bytes (__u32)))) ? 1: 0; \
})

Definition at line 52 of file xt_sctp.h.

#define SCTP_CHUNKMAP_RESET (   chunkmap)    memset((chunkmap), 0, sizeof(chunkmap))

Definition at line 58 of file xt_sctp.h.

#define SCTP_CHUNKMAP_SET (   chunkmap,
  type 
)
Value:
do { \
(chunkmap)[type / bytes(__u32)] |= \
1 << (type % bytes(__u32)); \
} while (0)

Definition at line 40 of file xt_sctp.h.

#define SCTP_CHUNKMAP_SET_ALL (   chunkmap)    memset((chunkmap), ~0U, sizeof(chunkmap))

Definition at line 61 of file xt_sctp.h.

#define XT_NUM_SCTP_FLAGS   4

Definition at line 18 of file xt_sctp.h.

#define XT_SCTP_CHUNK_TYPES   0x04

Definition at line 8 of file xt_sctp.h.

#define XT_SCTP_DEST_PORTS   0x02

Definition at line 7 of file xt_sctp.h.

#define XT_SCTP_SRC_PORTS   0x01

Definition at line 6 of file xt_sctp.h.

#define XT_SCTP_VALID_FLAGS   0x07

Definition at line 10 of file xt_sctp.h.