summaryrefslogtreecommitdiff
path: root/include/net/nexthop.h
blob: 3334dbfa5aa4b45ff76338fbd85819e85a7efe8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef __NET_NEXTHOP_H
#define __NET_NEXTHOP_H

#include <linux/rtnetlink.h>
#include <net/netlink.h>

static inline int rtnh_ok(const struct rtnexthop *rtnh, int remaining)
{
	return remaining >= sizeof(*rtnh) &&
	       rtnh->rtnh_len >= sizeof(*rtnh) &&
	       rtnh->rtnh_len <= remaining;
}

static inline struct rtnexthop *rtnh_next(const struct rtnexthop *rtnh,
                                         int *remaining)
{
	int totlen = NLA_ALIGN(rtnh->rtnh_len);

	*remaining -= totlen;
	return (struct rtnexthop *) ((char *) rtnh + totlen);
}

static inline struct nlattr *rtnh_attrs(const struct rtnexthop *rtnh)
{
	return (struct nlattr *) ((char *) rtnh + NLA_ALIGN(sizeof(*rtnh)));
}

static inline int rtnh_attrlen(const struct rtnexthop *rtnh)
{
	return rtnh->rtnh_len - NLA_ALIGN(sizeof(*rtnh));
}

#endif
act6721c'>feature/cib_contract6721c main, development code repositoryroot
summaryrefslogtreecommitdiff
path: root/desktop/qa
AgeCommit message (Expand)AuthorFilesLines
2012-11-19re-base on ALv2 code. Includes:Michael Meeks2-74/+14
2012-06-27targetted re-work of cppunit pieces.Michael Meeks1-3/+1
2011-11-27remove include of pch header in desktopNorbert Thiebaud1-2/+0
2011-11-27remove PCH support in dmake-moduleNorbert Thiebaud1-6/+0
2011-10-26chmod -xTor Lillqvist1-0/+0
2011-09-12sb140: #i113503# mixing system CppUnit and OOo STLport does not work, backed ...Stephan Bergmann1-1/+1
2011-09-12sb140: #i117694# some CppUnit related cleanupStephan Bergmann2-35/+2
2011-03-29drop bogus executable flag from [ch]xx/bas/asm filesFrancisco Saito1-0/+0
2011-03-12Merge commit 'ooo/DEV300_m101' into integration/dev300_m101Thorsten Behrens3-10/+15
2011-02-24remove empty TESTSHL2LIBCaolán McNamara1-1/+1
2010-10-13Add vim/emacs modelines to all source filesSebastian Spaeth1-0/+3
2010-07-16sb123: #i111602# hack for Windows PCH problemsb1-0/+6
2010-05-14sb123: #i111602# adapted desktop/qa/deployment_misc to new test frameworksb3-11/+10
2010-03-04sb118: #i109791# improved CPPUNIT_CFLAGS handlingsb1-4/+1
2010-03-04sb118: add missing CFLAGS+= $(CPPUNIT_CFLAGS) to loads of other makefiles, tooRene Engelhard1-0/+4
2010-02-12changefileheader2: #i109125#: change source file copyright notice from Sun Mi...Jens-Heiner Rechtien3-15/+4
2009-09-14#i103496#: split cppunit in a pure external lib and a lib depending on sal ->...Mathias Bauer2-4/+4
2008-04-11INTEGRATION: CWS changefileheader (1.2.200); FILE MERGEDRüdiger Timm3-68/+55