root/luci2/libunl/unl/genl.h @ 6262

Revision 6262, 1.5 KB (checked in by Cyrus, 3 years ago)

Adding libunl

Line 
1/**
2 *   unl - Minimalistic netlink library
3 *   Copyright (C) 2010 Steven Barth <steven@midlink.org>
4 *   Copyright (C) 2010 John Crispin <blogic@openwrt.org>
5 *
6 *   This program is free software; you can redistribute it and/or modify
7 *   it under the terms of the GNU General Public License as published by
8 *   the Free Software Foundation; either version 2 of the License, or
9 *   (at your option) any later version.
10 *
11 *   This program is distributed in the hope that it will be useful,
12 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
13 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 *   GNU General Public License for more details.
15 *
16 *   You should have received a copy of the GNU General Public License
17 *   along with this program; if not, write to the Free Software
18 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
19 *
20 */
21
22#ifndef UNL_GENL_H_
23#define UNL_GENL_H_
24
25#include "io.h"
26#define UNL_NLCTRL 0x10
27
28/*
29 * Resolve the family id of given netlink family
30 *
31 * returns the generic netlink family id for given name or -1 on error
32 */
33int unl_genl_resolve(struct unl *hndl, const char *family);
34
35/*
36 * (Un)Subscribes a multicast group of a generic netlink socket family
37 *
38 * returns 0 on success, -1 on errror
39 */
40int unl_genl_subscribe(struct unl *hndl, const char *family, const char *group);
41int unl_genl_unsubscribe(struct unl *hndl, const char *family, const char *group);
42
43#endif /* UNL_GENL_H_ */
Note: See TracBrowser for help on using the browser.