/*
- * snat.h - simple nat definitions
+ * nat.h - NAT plugin definitions
*
* Copyright (c) 2016 Cisco and/or its affiliates.
* Licensed under the Apache License, Version 2.0 (the "License");
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-#ifndef __included_snat_h__
-#define __included_snat_h__
+#ifndef __included_nat_h__
+#define __included_nat_h__
#include <vnet/vnet.h>
#include <vnet/ip/ip.h>
/* Key */
typedef struct {
- union
+ union
{
- struct
+ struct
{
ip4_address_t addr;
u16 port;
f64 last_heard; /* 44-51 */
u64 total_bytes; /* 52-59 */
-
+
u32 total_pkts; /* 60-63 */
/* Outside address */
*/
#define snat_is_unk_proto_session(s) s->flags & SNAT_SESSION_FLAG_UNKNOWN_PROTO
-/*
+/*
* Why is this here? Because we don't need to touch this layer to
* simply reply to an icmp. We need to change id to a unique
* value to NAT an echo request/reply.
*/
-
+
typedef struct {
u16 identifier;
u16 sequence;
return 0;
}
-#endif /* __included_snat_h__ */
+#endif /* __included_nat_h__ */