libnl 1.1

include/netlink/genl/genl.h

00001 /*
00002  * netlink/genl/genl.h          Generic Netlink
00003  *
00004  *      This library is free software; you can redistribute it and/or
00005  *      modify it under the terms of the GNU Lesser General Public
00006  *      License as published by the Free Software Foundation version 2.1
00007  *      of the License.
00008  *
00009  * Copyright (c) 2003-2006 Thomas Graf <tgraf@suug.ch>
00010  */
00011 
00012 #ifndef NETLINK_GENL_H_
00013 #define NETLINK_GENL_H_
00014 
00015 #include <netlink/netlink.h>
00016 #include <netlink/msg.h>
00017 #include <netlink/attr.h>
00018 
00019 #ifdef __cplusplus
00020 extern "C" {
00021 #endif
00022 
00023 extern int              genl_connect(struct nl_handle *);
00024 
00025 extern int              genl_send_simple(struct nl_handle *, int, int,
00026                                          int, int);
00027 
00028 extern void *           genlmsg_put(struct nl_msg *, uint32_t, uint32_t,
00029                                     int, int, int, uint8_t, uint8_t);
00030 
00031 extern int              genlmsg_valid_hdr(struct nlmsghdr *, int);
00032 extern int              genlmsg_validate(struct nlmsghdr *, int, int,
00033                                          struct nla_policy *);
00034 extern int              genlmsg_parse(struct nlmsghdr *, int, struct nlattr **,
00035                                       int, struct nla_policy *);
00036 extern void *           genlmsg_data(const struct genlmsghdr *);
00037 extern int              genlmsg_len(const struct genlmsghdr *);
00038 extern struct nlattr *  genlmsg_attrdata(const struct genlmsghdr *, int);
00039 extern int              genlmsg_attrlen(const struct genlmsghdr *, int);
00040 
00041 extern char *           genl_op2name(int, int, char *, size_t);
00042 
00043 #ifdef __cplusplus
00044 }
00045 #endif
00046 
00047 #endif