libnl
1.1
Main Page
Modules
Data Structures
Files
File List
tmp
B.583d423e-2a9c-4f28-9318-cd8e1ccfab29
BUILD
libnl-1.1
include
netlink
genl
mngt.h
1
/*
2
* netlink/genl/mngt.h Generic Netlink Management
3
*
4
* This library is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU Lesser General Public
6
* License as published by the Free Software Foundation version 2.1
7
* of the License.
8
*
9
* Copyright (c) 2003-2006 Thomas Graf <tgraf@suug.ch>
10
*/
11
12
#ifndef NETLINK_GENL_MNGT_H_
13
#define NETLINK_GENL_MNGT_H_
14
15
#include <netlink/netlink.h>
16
#include <netlink/attr.h>
17
#include <netlink/list.h>
18
19
#ifdef __cplusplus
20
extern
"C"
{
21
#endif
22
23
struct
nl_cache_ops
;
24
25
/**
26
* @ingroup genl_mngt
27
* Generic Netlink Command
28
*/
29
struct
genl_cmd
30
{
31
/** Unique command identifier */
32
int
c_id
;
33
34
/** Name/description of command */
35
char
*
c_name
;
36
37
/**
38
* Maximum attribute identifier, must be provided if
39
* a message parser is available.
40
*/
41
int
c_maxattr
;
42
43
int (*c_msg_parser)(
struct
nl_cache_ops
*,
44
struct
genl_cmd
*,
45
struct
genl_info *,
void
*);
46
47
/**
48
* Attribute validation policy (optional)
49
*/
50
struct
nla_policy
*
c_attr_policy
;
51
};
52
53
/**
54
* @ingroup genl_mngt
55
* Generic Netlink Operations
56
*/
57
struct
genl_ops
58
{
59
int
o_family;
60
int
o_id;
61
char
* o_name;
62
struct
nl_cache_ops
* o_cache_ops;
63
struct
genl_cmd
* o_cmds;
64
int
o_ncmds;
65
66
/* linked list of all genl cache operations */
67
struct
nl_list_head
o_list;
68
};
69
70
71
extern
int
genl_register
(
struct
nl_cache_ops
*);
72
extern
void
genl_unregister
(
struct
nl_cache_ops
*);
73
74
#ifdef __cplusplus
75
}
76
#endif
77
78
#endif
Generated on Sat Jul 20 2013 12:01:44 for libnl by
1.8.4