lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170809074316.3acaafa1@xeon-e3>
Date:   Wed, 9 Aug 2017 07:43:16 -0700
From:   Stephen Hemminger <stephen@...workplumber.org>
To:     David Lebrun <david.lebrun@...ouvain.be>
Cc:     <netdev@...r.kernel.org>
Subject: Re: [PATCH iproute2 net-next 2/3] iproute: add support for SRv6
 local segment processing

On Wed, 9 Aug 2017 15:17:00 +0200
David Lebrun <david.lebrun@...ouvain.be> wrote:

> +
> +static int read_action_type(const char *name)
> +{
> +	if (strcmp(name, "End") == 0)
> +		return SEG6_LOCAL_ACTION_END;
> +	else if (strcmp(name, "End.X") == 0)
> +		return SEG6_LOCAL_ACTION_END_X;
> +	else if (strcmp(name, "End.T") == 0)
> +		return SEG6_LOCAL_ACTION_END_T;
> +	else if (strcmp(name, "End.DX2") == 0)
> +		return SEG6_LOCAL_ACTION_END_DX2;
> +	else if (strcmp(name, "End.DX6") == 0)
> +		return SEG6_LOCAL_ACTION_END_DX6;
> +	else if (strcmp(name, "End.DX4") == 0)
> +		return SEG6_LOCAL_ACTION_END_DX4;
> +	else if (strcmp(name, "End.DT6") == 0)
> +		return SEG6_LOCAL_ACTION_END_DT6;
> +	else if (strcmp(name, "End.DT4") == 0)
> +		return SEG6_LOCAL_ACTION_END_DT4;
> +	else if (strcmp(name, "End.B6") == 0)
> +		return SEG6_LOCAL_ACTION_END_B6;
> +	else if (strcmp(name, "End.B6.Encaps") == 0)
> +		return SEG6_LOCAL_ACTION_END_B6_ENCAP;
> +	else if (strcmp(name, "End.BM") == 0)
> +		return SEG6_LOCAL_ACTION_END_BM;
> +	else if (strcmp(name, "End.S") == 0)
> +		return SEG6_LOCAL_ACTION_END_S;
> +	else if (strcmp(name, "End.AS") == 0)
> +		return SEG6_LOCAL_ACTION_END_AS;
> +	else if (strcmp(name, "End.AM") == 0)
> +		return SEG6_LOCAL_ACTION_END_AM;
> +
> +	return SEG6_LOCAL_ACTION_UNSPEC;
> +}

Why is this not a table instead of code?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ