netfilter
firewalling, NAT, and packet mangling for linux
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
errcode.c File Reference
#include <assert.h>
#include <errno.h>
#include <string.h>
#include <libipset/debug.h>
#include <libipset/data.h>
#include <libipset/session.h>
#include <libipset/types.h>
#include <libipset/utils.h>
#include <libipset/errcode.h>
#include <libipset/linux_ip_set_bitmap.h>
#include <libipset/linux_ip_set_hash.h>
#include <libipset/linux_ip_set_list.h>
Include dependency graph for errcode.c:

Macros

#define MATCH_TYPENAME(a, b)   STRNEQ(a, b, strlen(b))
 

Functions

int ipset_errcode (struct ipset_session *session, enum ipset_cmd cmd, int errcode)
 ipset_errcode - interpret a kernel error code : session structure : errcode More...
 

Macro Definition Documentation

#define MATCH_TYPENAME (   a,
 
)    STRNEQ(a, b, strlen(b))

Referenced by ipset_errcode().

Function Documentation

int ipset_errcode ( struct ipset_session session,
enum ipset_cmd  cmd,
int  errcode 
)

ipset_errcode - interpret a kernel error code : session structure : errcode

Find the error code and print the appropriate error message into the error buffer.

Returns -1.

References ipset_errcode_table::errcode, ipset_err, IPSET_ERR_PRIVATE, IPSET_ERR_TYPE_SPECIFIC, ipset_saved_type(), MATCH_TYPENAME, ipset_errcode_table::message, ipset_type::name, and type.

Here is the call graph for this function: