GUI: Fix Tomato RAF theme for all builds. Compilation typo.
[tomato.git] / release / src-rt-6.x.4708 / include / ctf / ctf_cfg.h
blobf6bd47faa1241931876751b762a1a149cc801b56
1 /*
2 * Copyright (C) 2012, Broadcom Corporation. All Rights Reserved.
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
11 * SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
13 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
14 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 * $Id: $
19 #ifndef _CTF_CFG_H_
20 #define _CTF_CFG_H_
22 #define NETLINK_CTF 20
24 #define SUCCESS 0
25 #define FAILURE -1
27 #define CTFCFG_MAX_SIZE sizeof(ctf_cfg_request_t)
28 #define CTFCFG_MAX_ARG_SIZE 1024
30 #define CTFCFG_CMD_SUSPEND 1
31 #define CTFCFG_CMD_RESUME 2
32 #define CTFCFG_CMD_TUPLE_VALID 3
33 #define CTFCFG_CMD_DEFAULT_FWD_GET 4
34 #define CTFCFG_CMD_DEFAULT_FWD_SET 5
36 #define CTFCFG_STATUS_SUCCESS 1
37 #define CTFCFG_STATUS_FAILURE 2
38 #define CTFCFG_STATUS_TUPLE_INVALID 3
39 #define CTFCFG_STATUS_FLOW_ALREADY_SUSPENDED 4
40 #define CTFCFG_STATUS_FLOW_NOT_SUSPENDED 5
41 #define CTFCFG_STATUS_DEFAULT_FWD_INVALID 6
43 typedef union
45 struct in_addr ip_v4;
46 struct in6_addr ip_v6;
47 } ip_address_t;
49 typedef struct
51 int family;
53 ip_address_t src_addr;
54 uint16_t src_port;
56 ip_address_t dst_addr;
57 uint16_t dst_port;
59 uint8_t protocol;
60 } ctf_tuple_t;
62 typedef enum {
63 CTF_FWD_FASTPATH,
64 CTF_FWD_HOST, /* i.e. send to network stack */
65 } ctf_fwd_t;
67 typedef struct ctf_cfg_request
69 uint32_t command_id;
70 uint32_t status; /* Command status */
71 uint32_t size; /* Size of the argument */
72 uint8_t arg[CTFCFG_MAX_ARG_SIZE];
73 } ctf_cfg_request_t;
75 #endif /* _CTF_CFG_H_ */