[Olsr-dev] [PATCH v1 21/23] gateway: setup/cleanup multi-gateway mode during startup/shutdown of olsrd

Henning Rogge (spam-protected)
Thu Dec 13 12:32:24 CET 2012


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.

Henning Rogge
-- 
Diplom-Informatiker Henning Rogge , Fraunhofer-Institut für
Kommunikation, Informationsverarbeitung und Ergonomie FKIE
Kommunikationssysteme (KOM)
Fraunhofer Straße 20, 53343 Wachtberg, Germany
Telefon +49 228 9435-961,   Fax +49 228 9435 685
mailto:(spam-protected) http://www.fkie.fraunhofer.de

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6169 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.olsr.org/pipermail/olsr-dev/attachments/20121213/1d651d9d/attachment.bin>


More information about the Olsr-dev mailing list