#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
</td><td class='form'><form method='get'>
<input type='hidden' name='id' value='9ff464db50e437eef131f719cc2e9902eea9c607'/><select name='h' onchange='this.form.submit();'>
<option value='emaclite-cleanup'>emaclite-cleanup</option>
<option value='master' selected='selected'>master</option>
<option value='nds-private-remove'>nds-private-remove</option>
<option value='packet-loop-back'>packet-loop-back</option>
<option value='packet-rx-pump-back'>packet-rx-pump-back</option>
</select> <input type='submit' value='switch'/></form></td></tr>
<tr><td class='sub'>net-next plumbings</td><td class='sub right'>Tobias Klauser</td></tr></table>
<table class='tabs'><tr><td>
<a href='/cgit.cgi/linux/net-next.git/'>summary</a><a href='/cgit.cgi/linux/net-next.git/refs/?id=9ff464db50e437eef131f719cc2e9902eea9c607'>refs</a><a class='active' href='/cgit.cgi/linux/net-next.git/log/include/net/act_api.h'>log</a><a href='/cgit.cgi/linux/net-next.git/tree/include/net/act_api.h?id=9ff464db50e437eef131f719cc2e9902eea9c607'>tree</a><a href='/cgit.cgi/linux/net-next.git/commit/include/net/act_api.h?id=9ff464db50e437eef131f719cc2e9902eea9c607'>commit</a><a href='/cgit.cgi/linux/net-next.git/diff/include/net/act_api.h?id=9ff464db50e437eef131f719cc2e9902eea9c607'>diff</a></td><td class='form'><form class='right' method='get' action='/cgit.cgi/linux/net-next.git/log/include/net/act_api.h'>
<input type='hidden' name='id' value='9ff464db50e437eef131f719cc2e9902eea9c607'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/cgit.cgi/linux/net-next.git/log/?id=9ff464db50e437eef131f719cc2e9902eea9c607'>root</a>/<a href='/cgit.cgi/linux/net-next.git/log/include?id=9ff464db50e437eef131f719cc2e9902eea9c607'>include</a>/<a href='/cgit.cgi/linux/net-next.git/log/include/net?id=9ff464db50e437eef131f719cc2e9902eea9c607'>net</a>/<a href='/cgit.cgi/linux/net-next.git/log/include/net/act_api.h?id=9ff464db50e437eef131f719cc2e9902eea9c607'>act_api.h</a></div><div class='content'><table class='list nowrap'><tr class='nohover'><th class='left'>Age</th><th class='left'>Commit message (<a href='/cgit.cgi/linux/net-next.git/log/include/net/act_api.h?id=9ff464db50e437eef131f719cc2e9902eea9c607&amp;showmsg=1'>Expand</a>)</th><th class='left'>Author</th><th class='left'>Files</th><th class='left'>Lines</th></tr>