Home | History | Annotate | Download | only in netfilter_ipv4
      1 /****************************************************************************
      2  ****************************************************************************
      3  ***
      4  ***   This header was automatically generated from a Linux kernel header
      5  ***   of the same name, to make information necessary for userspace to
      6  ***   call into the kernel available to libc.  It contains only constants,
      7  ***   structures, and macros generated from the original header, and thus,
      8  ***   contains no copyrightable information.
      9  ***
     10  ***   To edit the content of this header, modify the corresponding
     11  ***   source file (e.g. under external/kernel-headers/original/) then
     12  ***   run bionic/libc/kernel/tools/update_all.py
     13  ***
     14  ***   Any manual change here will be lost the next time this script will
     15  ***   be run. You've been warned!
     16  ***
     17  ****************************************************************************
     18  ****************************************************************************/
     19 #ifndef _IPT_SCTP_H_
     20 #define _IPT_SCTP_H_
     21 #define IPT_SCTP_SRC_PORTS 0x01
     22 #define IPT_SCTP_DEST_PORTS 0x02
     23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     24 #define IPT_SCTP_CHUNK_TYPES 0x04
     25 #define IPT_SCTP_VALID_FLAGS 0x07
     26 struct ipt_sctp_flag_info {
     27  u_int8_t chunktype;
     28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     29  u_int8_t flag;
     30  u_int8_t flag_mask;
     31 };
     32 #define IPT_NUM_SCTP_FLAGS 4
     33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     34 struct ipt_sctp_info {
     35  u_int16_t dpts[2];
     36  u_int16_t spts[2];
     37  u_int32_t chunkmap[256 / sizeof (u_int32_t)];
     38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     39 #define SCTP_CHUNK_MATCH_ANY 0x01
     40 #define SCTP_CHUNK_MATCH_ALL 0x02
     41 #define SCTP_CHUNK_MATCH_ONLY 0x04
     42  u_int32_t chunk_match_type;
     43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     44  struct ipt_sctp_flag_info flag_info[IPT_NUM_SCTP_FLAGS];
     45  int flag_count;
     46  u_int32_t flags;
     47  u_int32_t invflags;
     48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     49 };
     50 #define bytes(type) (sizeof(type) * 8)
     51 #define SCTP_CHUNKMAP_SET(chunkmap, type)   do {   chunkmap[type / bytes(u_int32_t)] |=   1 << (type % bytes(u_int32_t));   } while (0)
     52 #define SCTP_CHUNKMAP_CLEAR(chunkmap, type)   do {   chunkmap[type / bytes(u_int32_t)] &=   ~(1 << (type % bytes(u_int32_t)));   } while (0)
     53 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     54 #define SCTP_CHUNKMAP_IS_SET(chunkmap, type)  ({   (chunkmap[type / bytes (u_int32_t)] &   (1 << (type % bytes (u_int32_t)))) ? 1: 0;  })
     55 #define SCTP_CHUNKMAP_RESET(chunkmap)   do {   int i;   for (i = 0; i < ARRAY_SIZE(chunkmap); i++)   chunkmap[i] = 0;   } while (0)
     56 #define SCTP_CHUNKMAP_SET_ALL(chunkmap)   do {   int i;   for (i = 0; i < ARRAY_SIZE(chunkmap); i++)   chunkmap[i] = ~0;   } while (0)
     57 #define SCTP_CHUNKMAP_COPY(destmap, srcmap)   do {   int i;   for (i = 0; i < ARRAY_SIZE(chunkmap); i++)   destmap[i] = srcmap[i];   } while (0)
     58 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
     59 #define SCTP_CHUNKMAP_IS_CLEAR(chunkmap)  ({   int i;   int flag = 1;   for (i = 0; i < ARRAY_SIZE(chunkmap); i++) {   if (chunkmap[i]) {   flag = 0;   break;   }   }   flag;  })
     60 #define SCTP_CHUNKMAP_IS_ALL_SET(chunkmap)  ({   int i;   int flag = 1;   for (i = 0; i < ARRAY_SIZE(chunkmap); i++) {   if (chunkmap[i] != ~0) {   flag = 0;   break;   }   }   flag;  })
     61 #endif
     62