~ubuntu-branches/ubuntu/trusty/acpid/trusty-proposed

« back to all changes in this revision

Viewing changes to ng/acpid/include/acpid/netlink.h

  • Committer: Bazaar Package Importer
  • Author(s): Michael Meskes
  • Date: 2009-11-17 14:50:01 UTC
  • mfrom: (2.1.12 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091117145001-y5hevyg7gcg6uwjk
Tags: 1.0.10-4
Updated netlink patch to version 6.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
#ifndef __NETLINK_H__
 
3
#define __NETLINK_H__
 
4
 
 
5
#include <asm/types.h>
 
6
#include <linux/netlink.h>
 
7
#include <linux/rtnetlink.h>
 
8
 
 
9
struct netlink {
 
10
        int fd;
 
11
        struct sockaddr_nl local;
 
12
        __u32 seq;
 
13
};
 
14
 
 
15
 
 
16
 
 
17
#include <stdio.h>
 
18
#include <stdlib.h>
 
19
#include <unistd.h>
 
20
#include <syslog.h>
 
21
#include <fcntl.h>
 
22
#include <net/if_arp.h>
 
23
#include <sys/socket.h>
 
24
#include <netinet/in.h>
 
25
#include <string.h>
 
26
#include <errno.h>
 
27
#include <time.h>
 
28
#include <sys/uio.h>
 
29
 
 
30
#include <asm/types.h>
 
31
#include <linux/netlink.h>
 
32
 
 
33
#include "netlink.h"
 
34
 
 
35
void netlink_close(struct netlink *nl);
 
36
int netlink_open(struct netlink *nl, int protocol, int groups);
 
37
int netlink_send(struct netlink *nl, struct nlmsghdr *n, pid_t peer, int groups);
 
38
int netlink_recv(struct netlink *nl, struct nlmsghdr *n, pid_t *peer);
 
39
int netlink_wait(struct netlink *nl, struct nlmsghdr *n, pid_t peer);
 
40
 
 
41
int netlink_attr_attach(struct nlmsghdr *n, int max, int type, const void *data, int len);
 
42
int netlink_attr_parse(struct nlattr *table[], int max, struct nlattr *src, int len);
 
43
 
 
44
 
 
45
 
 
46
#endif /* __NETLINK_H__ */
 
47