Current File : //usr/include/linux/netfilter/xt_sctp.h
#ifndef _XT_SCTP_H_
#define _XT_SCTP_H_

#include <linux/types.h>

#define XT_SCTP_SRC_PORTS	        0x01
#define XT_SCTP_DEST_PORTS	        0x02
#define XT_SCTP_CHUNK_TYPES		0x04

#define XT_SCTP_VALID_FLAGS		0x07

struct xt_sctp_flag_info {
	__u8 chunktype;
	__u8 flag;
	__u8 flag_mask;
};

#define XT_NUM_SCTP_FLAGS	4

struct xt_sctp_info {
	__u16 dpts[2];  /* Min, Max */
	__u16 spts[2];  /* Min, Max */

	__u32 chunkmap[256 / sizeof (__u32)];  /* Bit mask of chunks to be matched according to RFC 2960 */

#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 */

	__u32 chunk_match_type;
	struct xt_sctp_flag_info flag_info[XT_NUM_SCTP_FLAGS];
	int flag_count;

	__u32 flags;
	__u32 invflags;
};

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

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

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

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

#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))
static __inline__ bool
__sctp_chunkmap_is_clear(const __u32 *chunkmap, unsigned int n)
{
	unsigned int i;
	for (i = 0; i < n; ++i)
		if (chunkmap[i])
			return false;
	return true;
}

#define SCTP_CHUNKMAP_IS_ALL_SET(chunkmap) \
	__sctp_chunkmap_is_all_set((chunkmap), ARRAY_SIZE(chunkmap))
static __inline__ bool
__sctp_chunkmap_is_all_set(const __u32 *chunkmap, unsigned int n)
{
	unsigned int i;
	for (i = 0; i < n; ++i)
		if (chunkmap[i] != ~0U)
			return false;
	return true;
}

#endif /* _XT_SCTP_H_ */

blog

blog

Beste Online Casinos in Deutschland.64

Beste Online Casinos in Deutschland ▶️ SPIELEN Содержимое Regulierung und Sicherheit Top Casino-Anbieter 1. Bwin 2. LeoVegas 3. Betway 4. 888 Casino 5. Casino.de Bonusangebote und Promotions No-Deposit-Bonus Einwilligungsbasierte Bonus Freispins Wiederholungsbasierte Bonus Spiele und Anpassung an Spieler Vielfältige Spielangebote Anpassungsfunktionen für Spieler Wenn es um das Vergnügen und die …

Read More »

91 Club Online Casino in India Demo Mode and Practice.211

91 Club Online Casino in India – Demo Mode and Practice ▶️ PLAY Содержимое 91 Club Online Casino in India: A Comprehensive Guide What is 91 Club Online Casino? Games and Features Unlock the Fun with Demo Mode and Practice Start Your Journey with a Bang: Exclusive Offers and Promotions …

Read More »

Best Online Casinos in Canada.947

Best Online Casinos in Canada ▶️ PLAY Содержимое Top-Rated Online Casinos in Canada Best Online Casinos with Free Bonus How to Choose the Best Online Casino for You Consider Your Budget Canada is known for its rich history of gaming and entertainment, and the online casino industry is no exception. …

Read More »

91 Club Online Casino in India Demo Mode and Practice.1118

91 Club Online Casino in India – Demo Mode and Practice ▶️ PLAY Содержимое 91 Club Online Casino in India: A Comprehensive Guide Discover the Thrill of Online Casino Gaming with 91 Club Why Choose 91 Club? Practice Your Skills in Demo Mode and Get Ready to Win Big In …

Read More »

– Официальный сайт Pinco Casino.5445

Пинко Казино – Официальный сайт Pinco Casino ▶️ ИГРАТЬ Содержимое Преимущества игры на официальном сайте Pinco Casino Как начать играть на официальном сайте Pinco Casino Конечно, безопасность и конфиденциальность игроков В наше время интернета и онлайн-игр, казино стали одним из самых популярных развлечений для многих людей. И среди них есть …

Read More »

1Win Azerbaijan – İdman Mərcləri və Casino saytı.3459

1Win Azerbaijan – İdman Mərcləri və Casino saytı ▶️ OYNA Содержимое 1Win Azerbaijan haqqında məlumatlar 1Win Azerbaijanın məqsədi Idman mərcələrindən istifadə edən məsləhətlər 1Win Casino saytı haqqında məlumatlar Idman mərcələrindən və casino saytı ilə bağlı məlumatlar Idman mərcəzlərindən məlumatlar Casino saytı ilə bağlı məlumatlar 1Win Azerbaycan – bu idman mərcəzi …

Read More »

Plinko – Online Casino Spel.921

Plinko – Online Casino Spel ▶️ SPELEN Содержимое Welkom bij het spel Winnen met de Plinko-regels Spelen met de online casino-opties Als je op zoek bent naar een online casino spel dat een beetje extra heeft, dan is Plinko zeker een spel waard om te proberen. Dit klassieke spel is …

Read More »

Glory Casino Bangladesh Official Website.513

Glory Casino Bangladesh Official Website ▶️ PLAY Содержимое Why Choose Glory Casino Bangladesh? Glory Casino APK and App Features and Benefits of Playing at Glory Casino Bangladesh How to Register and Start Playing at Glory Casino Bangladesh Are you looking for a reliable and secure online casino experience in Bangladesh? …

Read More »

– Официальный сайт Pinco Casino.885

Пинко Казино – Официальный сайт Pinco Casino ▶️ ИГРАТЬ Содержимое Преимущества игры на официальном сайте Pinco Casino Виды игр и слотов на официальном сайте Pinco Casino Бонусы и акции на официальном сайте Pinco Casino Бонусы для новых игроков Акции для постоянных игроков Как начать играть на официальном сайте Pinco Casino …

Read More »