WirelessNLController.cc File Reference

WirelessNLController non-inline non-template implementation. More...

#include "WirelessNLController.hh"
#include <algorithm>
#include <fstream>
#include <net/if.h>
#include <netlink/netlink.h>
#include <netlink/genl/genl.h>
#include <netlink/genl/ctrl.h>
#include <netlink/genl/family.h>
#include <boost/filesystem.hpp>
#include <boost/filesystem/fstream.hpp>
#include <senf/Utils/Cpp11Support/cast.hh>
#include <senf/Utils/Range.hh>
#include <senf/Utils/String.hh>
#include <senf/Utils/algorithm.hh>
#include <senf/Utils/membind.hh>

Go to the source code of this file.

Macros

#define prefix_
 
#define FOREACH_ID(x)   BOOST_PP_CAT(x, __LINE__)
 
#define FOREACH_NESTED_ATTR(attr, nla)
 
#define NLA_PUT(msg, attrtype, attrlen, data)
 
#define NLA_PUT_NESTED(msg, attrtype, nestedMsg)
 
#define KHZ_TO_MHZ(freq)   ((freq) / 1000)
 
#define MHZ_TO_KHZ(freq)   ((freq) * 1000)
 
#define ARRAY_SIZE(arr)   (sizeof(arr) / sizeof(arr[0]))
 
#define NLA_PUT_OPTIONAL_VECTOR(msg, attrtype, optvector)
 
#define BIT(x)   (1ULL<<(x))
 
#define GET_RULE_ATTR_OR_SKIP(var, attr)
 

Detailed Description

WirelessNLController non-inline non-template implementation.

Definition in file WirelessNLController.cc.

Macro Definition Documentation

◆ ARRAY_SIZE

#define ARRAY_SIZE (   arr)    (sizeof(arr) / sizeof(arr[0]))

Definition at line 67 of file WirelessNLController.cc.

◆ BIT

#define BIT (   x)    (1ULL<<(x))

Definition at line 567 of file WirelessNLController.cc.

◆ FOREACH_ID

#define FOREACH_ID (   x)    BOOST_PP_CAT(x, __LINE__)

Definition at line 38 of file WirelessNLController.cc.

◆ FOREACH_NESTED_ATTR

#define FOREACH_NESTED_ATTR (   attr,
  nla 
)
Value:
if (nla) \
for (int FOREACH_ID(_remaining) = nla_len(nla), \
FOREACH_ID(_loop_done) = 0; \
FOREACH_ID(_loop_done)==0; ++FOREACH_ID(_loop_done)) \
for (nlattr * attr = nla_attr_data(nla); \
nla_ok(attr, FOREACH_ID(_remaining)); \
attr = nla_next(attr, &(FOREACH_ID(_remaining))))
#define FOREACH_ID(x)

Definition at line 39 of file WirelessNLController.cc.

◆ GET_RULE_ATTR_OR_SKIP

#define GET_RULE_ATTR_OR_SKIP (   var,
  attr 
)
Value:
std::uint32_t var; \
if (not ruleAttr[attr]) continue; \
var = nla_get_u32(ruleAttr[attr]);

Definition at line 613 of file WirelessNLController.cc.

◆ KHZ_TO_MHZ

#define KHZ_TO_MHZ (   freq)    ((freq) / 1000)

Definition at line 64 of file WirelessNLController.cc.

◆ MHZ_TO_KHZ

#define MHZ_TO_KHZ (   freq)    ((freq) * 1000)

Definition at line 65 of file WirelessNLController.cc.

◆ NLA_PUT

#define NLA_PUT (   msg,
  attrtype,
  attrlen,
  data 
)
Value:
do { \
int r; \
if ((r = nla_put(msg.get(), attrtype, attrlen, data)) < 0) \
throw NetlinkException(r, "Failed to build the netlink message"); \
} while(0)
u8 data[SPECTRAL_HT20_NUM_BINS]

Definition at line 50 of file WirelessNLController.cc.

◆ NLA_PUT_NESTED

#define NLA_PUT_NESTED (   msg,
  attrtype,
  nestedMsg 
)
Value:
do { \
int r; \
if ((r = nla_put_nested(msg.get(), attrtype, nestedMsg.get())) < 0) \
throw NetlinkException(r, "Failed to build the netlink message"); \
} while(0)

Definition at line 57 of file WirelessNLController.cc.

◆ NLA_PUT_OPTIONAL_VECTOR

#define NLA_PUT_OPTIONAL_VECTOR (   msg,
  attrtype,
  optvector 
)
Value:
do { \
if (optvector) NLA_PUT( msg, attrtype, optvector->size(), \
optvector->empty() ? NULL : &(*optvector)[0]); \
} while (0);
#define NLA_PUT(msg, attrtype, attrlen, data)

Definition at line 474 of file WirelessNLController.cc.

◆ prefix_

#define prefix_

Definition at line 35 of file WirelessNLController.cc.