1/* 2 ************************************************************************** 3 * Copyright (c) 2014, The Linux Foundation. All rights reserved. 4 * Permission to use, copy, modify, and/or distribute this software for 5 * any purpose with or without fee is hereby granted, provided that the 6 * above copyright notice and this permission notice appear in all copies. 7 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 8 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 9 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 10 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 11 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 12 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT 13 * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 14 ************************************************************************** 15 */ 16 17#ifdef ECM_FRONT_END_NSS_ENABLE 18#include "ecm_nss_ipv6.h" 19#else 20static inline int ecm_nss_ipv6_init(struct dentry *dentry) 21{ 22 /* 23 * Just return if nss front end is not enabled 24 */ 25 return 0; 26} 27 28static inline void ecm_nss_ipv6_stop(int num) 29{ 30 /* 31 * Just return if nss front end is not enabled 32 */ 33 return; 34} 35 36static inline void ecm_nss_ipv6_exit(void) 37{ 38 /* 39 * Just return if nss front end is not enabled 40 */ 41 return; 42} 43#endif 44 45#ifdef ECM_FRONT_END_SFE_ENABLE 46#include "ecm_sfe_ipv6.h" 47#else 48static inline int ecm_sfe_ipv6_init(struct dentry *dentry) 49{ 50 /* 51 * Just return if sfe front end is not enabled 52 */ 53 return 0; 54} 55 56static inline void ecm_sfe_ipv6_stop(int num) 57{ 58 /* 59 * Just return if sfe front end is not enabled 60 */ 61 return; 62} 63 64static inline void ecm_sfe_ipv6_exit(void) 65{ 66 /* 67 * Just return if sfe front end is not enabled 68 */ 69 return; 70} 71#endif 72 73/* 74 * IPv6 rule sync reasons. 75 */ 76enum ecm_front_end_ipv6_rule_sync_reason { 77 ECM_FRONT_END_IPV6_RULE_SYNC_REASON_STATS = 0, /* Sync is to synchronize stats */ 78 ECM_FRONT_END_IPV6_RULE_SYNC_REASON_FLUSH, /* Sync is to flush a cache entry */ 79 ECM_FRONT_END_IPV6_RULE_SYNC_REASON_EVICT, /*Sync is to evict a cache entry */ 80 ECM_FRONT_END_IPV6_RULE_SYNC_REASON_DESTROY /* Sync is to destroy a cache entry */ 81}; 82 83extern void ecm_front_end_ipv6_stop(int num); 84extern int ecm_front_end_ipv6_init(struct dentry *dentry); 85extern void ecm_front_end_ipv6_exit(void); 86 87