ng_nat.h (c4c9b52b872066b7106453c20c4a2cc7b1de015a) ng_nat.h (e842c54054b846061bf92d0f8a23ee3126ede6a9)
1/*-
2 * Copyright 2005, Gleb Smirnoff <glebius@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 18 unchanged lines hidden (view full) ---

27 */
28
29#define NG_NAT_NODE_TYPE "nat"
30#define NGM_NAT_COOKIE 1107718711
31
32#define NG_NAT_HOOK_IN "in"
33#define NG_NAT_HOOK_OUT "out"
34
1/*-
2 * Copyright 2005, Gleb Smirnoff <glebius@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 18 unchanged lines hidden (view full) ---

27 */
28
29#define NG_NAT_NODE_TYPE "nat"
30#define NGM_NAT_COOKIE 1107718711
31
32#define NG_NAT_HOOK_IN "in"
33#define NG_NAT_HOOK_OUT "out"
34
35/* Arguments for NGM_NAT_SET_MODE message */
36struct ng_nat_mode {
37 uint32_t flags;
38 uint32_t mask;
39};
40
41/* Keep this in sync with the above structure definition */
42#define NG_NAT_MODE_INFO { \
43 { "flags", &ng_parse_uint32_type }, \
44 { "mask", &ng_parse_uint32_type }, \
45 { NULL } \
46}
47
48#define NG_NAT_LOG 0x01
49#define NG_NAT_DENY_INCOMING 0x02
50#define NG_NAT_SAME_PORTS 0x04
51#define NG_NAT_UNREGISTERED_ONLY 0x10
52#define NG_NAT_RESET_ON_ADDR_CHANGE 0x20
53#define NG_NAT_PROXY_ONLY 0x40
54#define NG_NAT_REVERSE 0x80
55
35enum {
36 NGM_NAT_SET_IPADDR = 1,
56enum {
57 NGM_NAT_SET_IPADDR = 1,
58 NGM_NAT_SET_MODE,
59 NGM_NAT_SET_TARGET,
37};
60};