1/*
2 * Copyright (c) 2012, The Linux Foundation. All rights reserved.
3 * Permission to use, copy, modify, and/or distribute this software for
4 * any purpose with or without fee is hereby granted, provided that the
5 * above copyright notice and this permission notice appear in all copies.
6 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
7 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
8 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
9 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
10 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
11 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
12 * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
13 */
14
15
16#ifndef _ISIS_NAT_HELPER_H_
17#define _ISIS_NAT_HELPER_H_
18
19#ifdef __cplusplus
20extern "C" {
21#endif                          /* __cplusplus */
22
23#include "fal/fal_nat.h"
24
25    sw_error_t nat_helper_init(a_uint32_t dev_id);
26
27    sw_error_t nat_helper_cleanup(a_uint32_t dev_id);
28
29#ifdef IN_NAT_HELPER
30#define ISIS_NAT_HELPER_INIT(rv, dev_id) \
31    { \
32        rv = nat_helper_init(dev_id); \
33        SW_RTN_ON_ERROR(rv); \
34    }
35
36#define ISIS_NAT_HELPER_CLEANUP(rv, dev_id) \
37    { \
38        rv = nat_helper_cleanup(dev_id); \
39        SW_RTN_ON_ERROR(rv); \
40    }
41#else
42#define ISIS_NAT_HELPER_INIT(rv, dev_id)
43#define ISIS_NAT_HELPER_CLEANUP(rv, dev_id)
44#endif
45
46
47#ifdef __cplusplus
48}
49#endif                          /* __cplusplus */
50#endif                          /* _ISIS_NAT_HELPER_H_ */
51