~ubuntu-branches/ubuntu/vivid/wpasupplicant/vivid

« back to all changes in this revision

Viewing changes to src/drivers/priv_netlink.h

  • Committer: Bazaar Package Importer
  • Author(s): Kel Modderman
  • Date: 2008-03-12 20:03:04 UTC
  • mfrom: (1.1.10 upstream)
  • mto: This revision was merged to the branch mainline in revision 4.
  • Revision ID: james.westby@ubuntu.com-20080312200304-4331y9wj46pdd34z
Tags: 0.6.3-1
* New upstream release.
* Drop patches applied upstream:
  - debian/patches/30_wpa_gui_qt4_eventhistoryui_rework.patch
  - debian/patches/31_wpa_gui_qt4_eventhistory_always_scrollbar.patch
  - debian/patches/32_wpa_gui_qt4_eventhistory_scroll_with_events.patch
  - debian/patches/40_dbus_ssid_data.patch
* Tidy up the clean target of debian/rules. Now that the madwifi headers are
  handled differently we no longer need to do any cleanup.
* Fix formatting error in debian/ifupdown/wpa_action.8 to make lintian
  quieter.
* Add patch to fix formatting errors in manpages build from sgml source. Use
  <emphasis> tags to hightlight keywords instead of surrounding them in
  strong quotes.
  - debian/patches/41_manpage_format_fixes.patch
* wpasupplicant binary package no longer suggests pcscd, guessnet, iproute
  or wireless-tools, nor does it recommend dhcp3-client. These are not
  needed.
* Add debian/patches/10_silence_siocsiwauth_icotl_failure.patch to disable
  ioctl failure messages that occur under normal conditions.
* Cherry pick two upstream git commits concerning the dbus interface:
  - debian/patches/11_avoid_dbus_version_namespace.patch
  - debian/patches/12_fix_potential_use_after_free.patch
* Add debian/patches/42_manpage_explain_available_drivers.patch to explain
  that not all of the driver backends are available in the provided
  wpa_supplicant binary, and that the canonical list of supported driver
  backends can be retrieved from the wpa_supplicant -h (help) output.
  (Closes: #466910)
* Add debian/patches/20_wpa_gui_qt4_disable_link_prl.patch to remove
  link_prl CONFIG compile flag added by qmake-qt4 >= 4.3.4-2 to avoid excess
  linking.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * wpa_supplicant - Private copy of Linux netlink/rtnetlink definitions.
 
3
 * Copyright (c) 2003-2005, Jouni Malinen <j@w1.fi>
 
4
 *
 
5
 * This program is free software; you can redistribute it and/or modify
 
6
 * it under the terms of the GNU General Public License version 2 as
 
7
 * published by the Free Software Foundation.
 
8
 *
 
9
 * Alternatively, this software may be distributed under the terms of BSD
 
10
 * license.
 
11
 *
 
12
 * See README and COPYING for more details.
 
13
 */
 
14
 
 
15
#ifndef PRIV_NETLINK_H
 
16
#define PRIV_NETLINK_H
 
17
 
 
18
/*
 
19
 * This should be replaced with user space header once one is available with C
 
20
 * library, etc..
 
21
 */
 
22
 
 
23
#ifndef IFF_LOWER_UP
 
24
#define IFF_LOWER_UP   0x10000         /* driver signals L1 up         */
 
25
#endif
 
26
#ifndef IFF_DORMANT
 
27
#define IFF_DORMANT    0x20000         /* driver signals dormant       */
 
28
#endif
 
29
 
 
30
#ifndef IFLA_IFNAME
 
31
#define IFLA_IFNAME 3
 
32
#endif
 
33
#ifndef IFLA_WIRELESS
 
34
#define IFLA_WIRELESS 11
 
35
#endif
 
36
#ifndef IFLA_OPERSTATE
 
37
#define IFLA_OPERSTATE 16
 
38
#endif
 
39
#ifndef IFLA_LINKMODE
 
40
#define IFLA_LINKMODE 17
 
41
#define IF_OPER_DORMANT 5
 
42
#define IF_OPER_UP 6
 
43
#endif
 
44
 
 
45
#define NLM_F_REQUEST 1
 
46
 
 
47
#define NETLINK_ROUTE 0
 
48
#define RTMGRP_LINK 1
 
49
#define RTM_BASE 0x10
 
50
#define RTM_NEWLINK (RTM_BASE + 0)
 
51
#define RTM_DELLINK (RTM_BASE + 1)
 
52
#define RTM_SETLINK (RTM_BASE + 3)
 
53
 
 
54
#define NLMSG_ALIGNTO 4
 
55
#define NLMSG_ALIGN(len) (((len) + NLMSG_ALIGNTO - 1) & ~(NLMSG_ALIGNTO - 1))
 
56
#define NLMSG_LENGTH(len) ((len) + NLMSG_ALIGN(sizeof(struct nlmsghdr)))
 
57
#define NLMSG_DATA(nlh) ((void*) (((char*) nlh) + NLMSG_LENGTH(0)))
 
58
 
 
59
#define RTA_ALIGNTO 4
 
60
#define RTA_ALIGN(len) (((len) + RTA_ALIGNTO - 1) & ~(RTA_ALIGNTO - 1))
 
61
#define RTA_OK(rta,len) \
 
62
((len) > 0 && (rta)->rta_len >= sizeof(struct rtattr) && \
 
63
(rta)->rta_len <= (len))
 
64
#define RTA_NEXT(rta,attrlen) \
 
65
((attrlen) -= RTA_ALIGN((rta)->rta_len), \
 
66
(struct rtattr *) (((char *)(rta)) + RTA_ALIGN((rta)->rta_len)))
 
67
#define RTA_LENGTH(len) (RTA_ALIGN(sizeof(struct rtattr)) + (len))
 
68
#define RTA_DATA(rta) ((void *) (((char *) (rta)) + RTA_LENGTH(0)))
 
69
 
 
70
 
 
71
struct sockaddr_nl
 
72
{
 
73
        sa_family_t nl_family;
 
74
        unsigned short nl_pad;
 
75
        u32 nl_pid;
 
76
        u32 nl_groups;
 
77
};
 
78
 
 
79
struct nlmsghdr
 
80
{
 
81
        u32 nlmsg_len;
 
82
        u16 nlmsg_type;
 
83
        u16 nlmsg_flags;
 
84
        u32 nlmsg_seq;
 
85
        u32 nlmsg_pid;
 
86
};
 
87
 
 
88
struct ifinfomsg
 
89
{
 
90
        unsigned char ifi_family;
 
91
        unsigned char __ifi_pad;
 
92
        unsigned short ifi_type;
 
93
        int ifi_index;
 
94
        unsigned ifi_flags;
 
95
        unsigned ifi_change;
 
96
};
 
97
 
 
98
struct rtattr
 
99
{
 
100
        unsigned short rta_len;
 
101
        unsigned short rta_type;
 
102
};
 
103
 
 
104
#endif /* PRIV_NETLINK_H */