libnl 1.1.4
genl.h
1/*
2 * netlink/genl/genl.h Generic Netlink
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_H_
13#define NETLINK_GENL_H_
14
15#include <netlink/netlink.h>
16#include <netlink/msg.h>
17#include <netlink/attr.h>
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23extern int genl_connect(struct nl_handle *);
24
25extern int genl_send_simple(struct nl_handle *, int, int,
26 int, int);
27
28extern void * genlmsg_put(struct nl_msg *, uint32_t, uint32_t,
29 int, int, int, uint8_t, uint8_t);
30
31extern int genlmsg_valid_hdr(struct nlmsghdr *, int);
32extern int genlmsg_validate(struct nlmsghdr *, int, int,
33 struct nla_policy *);
34extern int genlmsg_parse(struct nlmsghdr *, int, struct nlattr **,
35 int, struct nla_policy *);
36extern void * genlmsg_data(const struct genlmsghdr *);
37extern int genlmsg_len(const struct genlmsghdr *);
38extern struct nlattr * genlmsg_attrdata(const struct genlmsghdr *, int);
39extern int genlmsg_attrlen(const struct genlmsghdr *, int);
40
41extern char * genl_op2name(int, int, char *, size_t);
42
43#ifdef __cplusplus
44}
45#endif
46
47#endif
void * genlmsg_put(struct nl_msg *, uint32_t, uint32_t, int, int, int, uint8_t, uint8_t)
Add generic netlink header to netlink message.
Definition: genl.c:247
struct nlattr * genlmsg_attrdata(const struct genlmsghdr *, int)
Get head of attribute data.
Definition: genl.c:212
int genlmsg_len(const struct genlmsghdr *)
Get lenght of message payload.
Definition: genl.c:200
int genl_send_simple(struct nl_handle *, int, int, int, int)
Send trivial generic netlink message.
Definition: genl.c:128
void * genlmsg_data(const struct genlmsghdr *)
Get head of message payload.
Definition: genl.c:191
int genlmsg_attrlen(const struct genlmsghdr *, int)
Get length of attribute data.
Definition: genl.c:222
attribute validation policy
Definition: attr.h:73
Netlink message header.