[Olsr-dev] [PATCH v1 21/23] gateway: setup/cleanup multi-gateway mode during startup/shutdown of olsrd
Ferry Huberts
(spam-protected)
Thu Dec 13 12:34:49 CET 2012
On 13/12/12 12:32, Henning Rogge wrote:
> On 12/04/2012 04:17 PM, Ferry Huberts wrote:
>> +/*
>> + * Defines for the multi-gateway script
>> + */
>> +
>> +#define SCRIPT_IPVERSION ((olsr_cnf->ip_version == AF_INET) ?
>> "ipv4" : "ipv6")
>
> I am not really a fan of macros like this.
>
>> +#define SCRIPT_MODE_GENERIC "generic"
>> +#define SCRIPT_MODE_OLSRIF "olsrif"
>> +#define SCRIPT_MODE_SGWSRVTUN "sgwsrvtun"
>> +#define SCRIPT_MODE_EGRESSIF "egressif"
>> +#define SCRIPT_MODE_SGWTUN "sgwtun"
>> +
>> +#define SCRIPT_ADDMODE(add) (add ? "add" : "del")
>
> This one looks strange too.
>
> Can we maybe both inline them? If we really need them, we can convert
> them into inline functions.
>
Can do that, but they're file-private anyway.
Do you still want them inline?
--
Ferry Huberts
More information about the Olsr-dev
mailing list