diff options
author | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2013-04-06 09:52:33 +0200 |
---|---|---|
committer | Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> | 2013-04-09 21:42:16 +0200 |
commit | 5e5e23e79dbc4cf581a09149885fef178bc07725 (patch) | |
tree | c6a44d2d37c167c91b08663cfa8411d10c2344b6 /include | |
parent | e3c9c32fb9079da7eb8257650a034b8b12d19d42 (diff) |
The uapi include split in the package itself
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Diffstat (limited to 'include')
-rw-r--r-- | include/libipset/linux_ip_set.h | 34 | ||||
-rw-r--r-- | include/libipset/linux_ip_set_bitmap.h | 7 | ||||
-rw-r--r-- | include/libipset/linux_ip_set_hash.h | 7 | ||||
-rw-r--r-- | include/libipset/linux_ip_set_list.h | 7 |
4 files changed, 42 insertions, 13 deletions
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 <gozem@linux.nu> * Patrick Schaaf <bof@bof.de> * Martin Josefsson <gandalf@wlug.westbo.se> @@ -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 <linux/types.h> @@ -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 */ |