This source file includes following definitions.
- network_netdev_gperf_hash
- network_netdev_gperf_lookup
#if !((' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
&& ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
&& (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
&& ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
&& ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
&& ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
&& ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
&& ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
&& ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
&& ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
&& ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
&& ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
&& ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
&& ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
&& ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
&& ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
&& ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
&& ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
&& ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
&& ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
&& ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
&& ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
&& ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126))
#error "gperf generated tables don't work with this execution character set. Please report a bug to <bug-gnu-gperf@gnu.org>."
#endif
#include <stddef.h>
#include "conf-parser.h"
#include "networkd-netdev.h"
#include "networkd-netdev-tunnel.h"
#include "networkd-netdev-bond.h"
#include "networkd-netdev-macvlan.h"
#include "network-internal.h"
#include <string.h>
#define TOTAL_KEYWORDS 39
#define MIN_WORD_LENGTH 7
#define MAX_WORD_LENGTH 23
#define MIN_HASH_VALUE 8
#define MAX_HASH_VALUE 69
#ifdef __GNUC__
__inline
#else
#ifdef __cplusplus
inline
#endif
#endif
static unsigned int
network_netdev_gperf_hash (register const char *str, register unsigned int len)
{
static const unsigned char asso_values[] =
{
70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
70, 70, 70, 70, 70, 0, 70, 70, 70, 70,
70, 70, 70, 70, 70, 70, 40, 30, 70, 0,
0, 70, 70, 15, 30, 70, 70, 70, 20, 70,
70, 70, 70, 70, 70, 70, 70, 15, 70, 15,
70, 0, 70, 70, 70, 10, 70, 70, 70, 70,
10, 10, 25, 70, 0, 5, 70, 0, 70, 70,
70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
70, 70, 70, 70, 70, 70, 70, 70, 70, 70,
70, 70, 70, 70, 70, 70
};
register int hval = len;
switch (hval)
{
default:
hval += asso_values[(unsigned char)str[8]];
case 8:
case 7:
case 6:
case 5:
case 4:
case 3:
case 2:
hval += asso_values[(unsigned char)str[1]];
break;
}
return hval;
}
#ifdef __GNUC__
__inline
#if defined __GNUC_STDC_INLINE__ || defined __GNUC_GNU_INLINE__
__attribute__ ((__gnu_inline__))
#endif
#endif
const struct ConfigPerfItem *
network_netdev_gperf_lookup (register const char *str, register unsigned int len)
{
static const struct ConfigPerfItem wordlist[] =
{
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{"Tun.User", config_parse_string, 0, offsetof(TunTap, user_name)},
{"Peer.Name", config_parse_ifname, 0, offsetof(Veth, ifname_peer)},
{"Tunnel.TOS", config_parse_unsigned, 0, offsetof(Tunnel, tos)},
{(char*)0},
{"Tun.OneQueue", config_parse_bool, 0, offsetof(TunTap, one_queue)},
{"Tunnel.Remote", config_parse_tunnel_address, 0, offsetof(Tunnel, remote)},
{"Tun.PacketInfo", config_parse_bool, 0, offsetof(TunTap, packet_info)},
{"Peer.MACAddress", config_parse_hwaddr, 0, offsetof(Veth, mac_peer)},
{(char*)0},
{"NetDev.MACAddress", config_parse_hwaddr, 0, offsetof(NetDev, mac)},
{"NetDev.Description", config_parse_string, 0, offsetof(NetDev, description)},
{"Bond.Mode", config_parse_bond_mode, 0, offsetof(Bond, mode)},
{(char*)0},
{"NetDev.Kind", config_parse_netdev_kind, 0, offsetof(NetDev, kind)},
{"Tunnel.Local", config_parse_tunnel_address, 0, offsetof(Tunnel, local)},
{"Tap.User", config_parse_string, 0, offsetof(TunTap, user_name)},
{"Tun.MultiQueue", config_parse_bool, 0, offsetof(TunTap, multi_queue)},
{"Bond.UpDelaySec", config_parse_sec, 0, offsetof(Bond, updelay)},
{"NetDev.Name", config_parse_ifname, 0, offsetof(NetDev, ifname)},
{"Tap.OneQueue", config_parse_bool, 0, offsetof(TunTap, one_queue)},
{"VXLAN.Id", config_parse_uint64, 0, offsetof(VxLan, id)},
{"Tap.PacketInfo", config_parse_bool, 0, offsetof(TunTap, packet_info)},
{"Match.Host", config_parse_net_condition, CONDITION_HOST, offsetof(NetDev, match_host)},
{"Bond.LACPTransmitRate", config_parse_bond_lacp_rate, 0, offsetof(Bond, lacp_rate)},
{"Tunnel.DiscoverPathMTU", config_parse_bool, 0, offsetof(Tunnel, pmtudisc)},
{(char*)0},
{"Tun.Group", config_parse_string, 0, offsetof(TunTap, group_name)},
{"Match.Virtualization", config_parse_net_condition, CONDITION_VIRTUALIZATION, offsetof(NetDev, match_virt)},
{(char*)0},
{"Bond.DownDelaySec", config_parse_sec, 0, offsetof(Bond, downdelay)},
{"Match.KernelCommandLine", config_parse_net_condition, CONDITION_KERNEL_COMMAND_LINE, offsetof(NetDev, match_kernel)},
{"Tap.MultiQueue", config_parse_bool, 0, offsetof(TunTap, multi_queue)},
{"Tunnel.TTL", config_parse_unsigned, 0, offsetof(Tunnel, ttl)},
{"VXLAN.Group", config_parse_tunnel_address, 0, offsetof(VxLan, group)},
{"MACVLAN.Mode", config_parse_macvlan_mode, 0, offsetof(MacVlan, mode)},
{"Bond.TransmitHashPolicy", config_parse_bond_xmit_hash_policy, 0, offsetof(Bond, xmit_hash_policy)},
{"VXLAN.TOS", config_parse_unsigned, 0, offsetof(VxLan, tos)},
{"NetDev.MTUBytes", config_parse_iec_size, 0, offsetof(NetDev, mtu)},
{(char*)0},
{"VLAN.Id", config_parse_uint64, 0, offsetof(VLan, id)},
{"Match.Architecture", config_parse_net_condition, CONDITION_ARCHITECTURE, offsetof(NetDev, match_arch)},
{"Tap.Group", config_parse_string, 0, offsetof(TunTap, group_name)},
{(char*)0}, {(char*)0},
{"VXLAN.MacLearning", config_parse_bool, 0, offsetof(VxLan, learning)},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0},
{"Bond.MIIMonitorSec", config_parse_sec, 0, offsetof(Bond, miimon)},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0}, {(char*)0}, {(char*)0},
{(char*)0}, {(char*)0},
{"VXLAN.TTL", config_parse_unsigned, 0, offsetof(VxLan, ttl)}
};
if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
{
register int key = network_netdev_gperf_hash (str, len);
if (key <= MAX_HASH_VALUE && key >= 0)
{
register const char *s = wordlist[key].section_and_lvalue;
if (s && *str == *s && !strcmp (str + 1, s + 1))
return &wordlist[key];
}
}
return 0;
}