2 * Copyright (C) 2013 Realtek Semiconductor Corp.
5 * Unless you and Realtek execute a separate written software license
6 * agreement governing use of this software, this software is licensed
7 * to you under the terms of the GNU General Public License version 2,
8 * available at https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
11 * $Date: 2017-03-08 15:13:58 +0800 (¶g¤T, 08 ¤T¤ë 2017) $
13 * Purpose : RTL8367C switch high-level type enum definition.
18 #ifndef _RTL8367C_TYPES_H_
19 #define _RTL8367C_TYPES_H_
23 typedef unsigned long long rtk_uint64
;
24 typedef long long rtk_int64
;
25 typedef unsigned int rtk_uint32
;
26 typedef int rtk_int32
;
27 typedef unsigned short rtk_uint16
;
28 typedef short rtk_int16
;
29 typedef unsigned char rtk_uint8
;
30 typedef char rtk_int8
;
34 #define RTK_TOTAL_NUM_OF_WORD_FOR_1BIT_PORT_LIST 1
36 #define RTK_MAX_NUM_OF_PORT 8
37 #define RTK_PORT_ID_MAX (RTK_MAX_NUM_OF_PORT-1)
38 #define RTK_PHY_ID_MAX (RTK_MAX_NUM_OF_PORT-4)
39 #define RTK_MAX_PORT_MASK 0xFF
41 #define RTK_WHOLE_SYSTEM 0xFF
43 typedef struct rtk_portmask_s
45 rtk_uint32 bits
[RTK_TOTAL_NUM_OF_WORD_FOR_1BIT_PORT_LIST
];
48 typedef enum rtk_enable_e
55 #ifndef ETHER_ADDR_LEN
56 #define ETHER_ADDR_LEN 6
59 /* ethernet address type */
60 typedef struct rtk_mac_s
62 rtk_uint8 octet
[ETHER_ADDR_LEN
];
65 typedef rtk_uint32 rtk_pri_t
; /* priority vlaue */
66 typedef rtk_uint32 rtk_qid_t
; /* queue id type */
67 typedef rtk_uint32 rtk_data_t
;
68 typedef rtk_uint32 rtk_dscp_t
; /* dscp vlaue */
69 typedef rtk_uint32 rtk_fid_t
; /* filter id type */
70 typedef rtk_uint32 rtk_vlan_t
; /* vlan id type */
71 typedef rtk_uint32 rtk_mac_cnt_t
; /* MAC count type */
72 typedef rtk_uint32 rtk_meter_id_t
; /* meter id type */
73 typedef rtk_uint32 rtk_rate_t
; /* rate type */
75 typedef enum rtk_port_e
98 typedef unsigned long long uint64
;
99 typedef long long int64
;
100 typedef unsigned int uint32
;
102 typedef unsigned short uint16
;
104 typedef unsigned char uint8
;
108 typedef rtk_uint32 ipaddr_t
;
109 typedef rtk_uint32 memaddr
;
111 #ifndef ETHER_ADDR_LEN
112 #define ETHER_ADDR_LEN 6
115 typedef struct ether_addr_s
{
116 rtk_uint8 octet
[ETHER_ADDR_LEN
];
120 #define rtlglue_printf printk
122 #define rtlglue_printf printf
124 #define PRINT rtlglue_printf
125 #endif /*_RTL_TYPES_H*/
127 /* type abstraction */
128 #ifdef EMBEDDED_SUPPORT
130 typedef rtk_int16 rtk_api_ret_t
;
131 typedef rtk_int16 ret_t
;
132 typedef rtk_uint32 rtk_u_long
;
136 typedef rtk_int32 rtk_api_ret_t
;
137 typedef rtk_int32 ret_t
;
138 typedef rtk_uint64 rtk_u_long_t
;
155 #endif /* _RTL8367C_TYPES_H_ */