From 5e5e23e79dbc4cf581a09149885fef178bc07725 Mon Sep 17 00:00:00 2001 From: Jozsef Kadlecsik Date: Sat, 6 Apr 2013 09:52:33 +0200 Subject: The uapi include split in the package itself Signed-off-by: Jozsef Kadlecsik --- include/libipset/linux_ip_set.h | 34 ++++++++++++++++++++++++++++++---- include/libipset/linux_ip_set_bitmap.h | 7 ++++--- include/libipset/linux_ip_set_hash.h | 7 ++++--- include/libipset/linux_ip_set_list.h | 7 ++++--- 4 files changed, 42 insertions(+), 13 deletions(-) (limited to 'include') diff --git a/include/libipset/linux_ip_set.h b/include/libipset/linux_ip_set.h index d3267a4..f7ed8c9 100644 --- a/include/libipset/linux_ip_set.h +++ b/include/libipset/linux_ip_set.h @@ -1,6 +1,3 @@ -#ifndef _IP_SET_H -#define _IP_SET_H - /* Copyright (C) 2000-2002 Joakim Axelsson * Patrick Schaaf * Martin Josefsson @@ -10,6 +7,9 @@ * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ +#ifndef _UAPI_IP_SET_H +#define _UAPI_IP_SET_H + #include @@ -202,4 +202,30 @@ enum ip_set_kopt { IPSET_RETURN_NOMATCH = (1 << IPSET_BIT_RETURN_NOMATCH), }; -#endif /* __IP_SET_H */ + +/* Interface to iptables/ip6tables */ + +#define SO_IP_SET 83 + +union ip_set_name_index { + char name[IPSET_MAXNAMELEN]; + ip_set_id_t index; +}; + +#define IP_SET_OP_GET_BYNAME 0x00000006 /* Get set index by name */ +struct ip_set_req_get_set { + unsigned int op; + unsigned int version; + union ip_set_name_index set; +}; + +#define IP_SET_OP_GET_BYINDEX 0x00000007 /* Get set name by index */ +/* Uses ip_set_req_get_set */ + +#define IP_SET_OP_VERSION 0x00000100 /* Ask kernel version */ +struct ip_set_req_version { + unsigned int op; + unsigned int version; +}; + +#endif /*_UAPI_IP_SET_H */ diff --git a/include/libipset/linux_ip_set_bitmap.h b/include/libipset/linux_ip_set_bitmap.h index 95fb963..6a2c038 100644 --- a/include/libipset/linux_ip_set_bitmap.h +++ b/include/libipset/linux_ip_set_bitmap.h @@ -1,5 +1,5 @@ -#ifndef __IP_SET_BITMAP_H -#define __IP_SET_BITMAP_H +#ifndef _UAPI__IP_SET_BITMAP_H +#define _UAPI__IP_SET_BITMAP_H /* Bitmap type specific error codes */ enum { @@ -9,4 +9,5 @@ enum { IPSET_ERR_BITMAP_RANGE_SIZE, }; -#endif /* __IP_SET_BITMAP_H */ + +#endif /* _UAPI__IP_SET_BITMAP_H */ diff --git a/include/libipset/linux_ip_set_hash.h b/include/libipset/linux_ip_set_hash.h index 7a9e5f7..352eecc 100644 --- a/include/libipset/linux_ip_set_hash.h +++ b/include/libipset/linux_ip_set_hash.h @@ -1,5 +1,5 @@ -#ifndef __IP_SET_HASH_H -#define __IP_SET_HASH_H +#ifndef _UAPI__IP_SET_HASH_H +#define _UAPI__IP_SET_HASH_H /* Hash type specific error codes */ enum { @@ -17,4 +17,5 @@ enum { IPSET_ERR_HASH_RANGE, }; -#endif /* __IP_SET_HASH_H */ + +#endif /* _UAPI__IP_SET_HASH_H */ diff --git a/include/libipset/linux_ip_set_list.h b/include/libipset/linux_ip_set_list.h index 2395aa2..a44efaa 100644 --- a/include/libipset/linux_ip_set_list.h +++ b/include/libipset/linux_ip_set_list.h @@ -1,5 +1,5 @@ -#ifndef __IP_SET_LIST_H -#define __IP_SET_LIST_H +#ifndef _UAPI__IP_SET_LIST_H +#define _UAPI__IP_SET_LIST_H /* List type specific error codes */ enum { @@ -17,4 +17,5 @@ enum { IPSET_ERR_REF_EXIST, }; -#endif /* __IP_SET_LIST_H */ + +#endif /* _UAPI__IP_SET_LIST_H */ -- cgit v1.2.3