blob: 94b35f9c6488117e5cedb06a3b53d68f8c370702 [file] [log] [blame]
yu.dongc592bc72024-04-24 22:45:13 -07001/*****************************************************************************
2 *
3 * Copyright (c) 2019, MediaTek Inc. All rights reserved.
4 * This software/firmware and related documentation ("MediaTek Software") are
5 * protected under relevant copyright laws. The information contained herein is
6 * confidential and proprietary to MediaTek Inc. and/or its licensors. Except as
7 * otherwise provided in the applicable licensing terms with MediaTek Inc.
8 * and/or its licensors, any reproduction, modification, use or disclosure of
9 * MediaTek Software, and information contained herein, in whole or in part,
10 * shall be strictly prohibited.
11 *
12 *****************************************************************************/
13
rjw6c1fd8f2022-11-30 14:33:01 +080014#ifndef __URSP_PUBLIC_DEFS_H__
15#define __URSP_PUBLIC_DEFS_H__
16
17#include "d2pm_public_defs.h"
18
19// Type denifitions
20typedef enum
21{
22 URSP_RES_FAIL = -1,
23 URSP_RES_NONE,
24 URSP_RES_SUCC,
25 URSP_RES_MAX = 0x7FFFFFFF
26}ursp_res_enum;
27
28typedef enum
29{
30 URSP_ROUTE_SUPP_PROFILE_TYPE_NONE = 0,
31 URSP_ROUTE_SUPP_PROFILE_TYPE_REQ,
32 URSP_ROUTE_SUPP_PROFILE_TYPE_MAX = 0x7FFFFFFF
33}ursp_route_supp_profile_type_enum;
34
35typedef enum
36{
37 URSP_REEVAL_EVENT_NONE = 0,
38 URSP_REEVAL_EVENT_PERIODIC,
39 URSP_REEVAL_EVENT_PDU_REL,
40 URSP_REEVAL_EVENT_PCF_UPDATE,
41 URSP_REEVAL_EVENT_INTER_SYS,
42 URSP_REEVAL_EVENT_REG,
43 URSP_REEVAL_EVENT_WLAN_EST,
44 URSP_REEVAL_EVENT_WLAN_REL,
45 URSP_REEVAL_EVENT_ALLOWED_NSSAI,
46 URSP_REEVAL_EVENT_LADN,
47 URSP_REEVAL_EVENT_MAX = 0x7FFFFFFF
48}ursp_reeval_event_enum;
49
50// => Internal
rjw6c1fd8f2022-11-30 14:33:01 +080051#if 0
52/* under construction !*/
53/* under construction !*/
54/* under construction !*/
55/* under construction !*/
56/* under construction !*/
57/* under construction !*/
58/* under construction !*/
59/* under construction !*/
60/* under construction !*/
yu.dongc592bc72024-04-24 22:45:13 -070061/* under construction !*/
62/* under construction !*/
63/* under construction !*/
64/* under construction !*/
65/* under construction !*/
66/* under construction !*/
67/* under construction !*/
68/* under construction !*/
69/* under construction !*/
70/* under construction !*/
71/* under construction !*/
72/* under construction !*/
73/* under construction !*/
74/* under construction !*/
75/* under construction !*/
76/* under construction !*/
77/* under construction !*/
78/* under construction !*/
79/* under construction !*/
80/* under construction !*/
81/* under construction !*/
82/* under construction !*/
rjw6c1fd8f2022-11-30 14:33:01 +080083#endif
84
85// Macro
86#define URSP_CID_BITMAP_SIZE (D2PM_CID_BITMAP_SIZE)
yu.dongc592bc72024-04-24 22:45:13 -070087#define URSP_UE_POLICY_MAX_RULE_LIST_SIZE (16) // NEED_TO_BE_NOTICED, should be configured by MCF, 'eight' refers to the maximum size of allowed NSSAI, i.e. at most eight different slices, however, changed to sixteen due to ALPS07656683
88#define URSP_RULE_MAX_ROUTE_SEL_DESC_LIST_SIZE (16) // NEED_TO_BE_NOTICED, should be configured by MCF, 'eight' refers to the maximum size of allowed NSSAI, i.e. at most eight different slices, however, changed to sizteen due to ALPS07656683
rjw6c1fd8f2022-11-30 14:33:01 +080089// => LADN
90#define URSP_MAX_LADN_DNN_NUM (8)
91#define URSP_LADN_DNN_DELIM "\x1F"
92#define URSP_LDAN_DNN_BITMAP_SIZE (((URSP_MAX_LADN_DNN_NUM - 1) >> 3) + 1)
93// => Evaluation Flags
94#define URSP_EVAL_FLAG_NONE (0x00000000)
95#define URSP_EVAL_MATCH_ALL_DISALLOW (0x00000001)
96// => Route attributes
97#define URSP_ROUTE_ATTR_NONE (0x00000000)
98#define URSP_ROUTE_ATTR_MATCH_ALL (0x00000001)
99#define URSP_ROUTE_ATTR_UE_LOCAL_CONF (0x00000002)
100// => Internal
101#define URSP_DNN_SIZE (100) // APN in TS 23.003
102// => => Traffic descriptor component type identifier
103#define URSP_TDC_TYPE_MATCH_ALL (0x01)
104#define URSP_TDC_TYPE_OS_ID (0x08)
105#define URSP_TDC_TYPE_IPV4_REMOTE_ADDR (0x10)
106#define URSP_TDC_TYPE_IPV6_REMOTE_ADDR (0x21)
107#define URSP_TDC_TYPE_IPV4_PROT_ID (0x30)
108#define URSP_TDC_TYPE_IPV6_NEXT_HDR (0x30)
109#define URSP_TDC_TYPE_SINGLE_REMOTE_PORT (0x50)
110#define URSP_TDC_TYPE_REMOTE_PORT_RANGE (0x51)
yu.dongc592bc72024-04-24 22:45:13 -0700111#define URSP_TDC_TYPE_IP_3_TUPLE (0x52)
rjw6c1fd8f2022-11-30 14:33:01 +0800112#define URSP_TDC_TYPE_SEC_PARAM_IDX (0x60)
113#define URSP_TDC_TYPE_TYPE_OF_SVC (0x70)
114#define URSP_TDC_TYPE_TFC_CLASS (0x70)
115#define URSP_TDC_TYPE_FLOW_LABEL (0x80)
116#define URSP_TDC_TYPE_DST_MAC_ADDR (0x81)
117#define URSP_TDC_TYPE_C_TAG_VID (0x83)
118#define URSP_TDC_TYPE_S_TAG_VID (0x84)
119#define URSP_TDC_TYPE_C_TAG_PCP_DEI (0x85)
120#define URSP_TDC_TYPE_S_TAG_PCP_DEI (0x86)
121#define URSP_TDC_TYPE_ETH_TYPE (0x87)
122#define URSP_TDC_TYPE_DNN (0x88)
123#define URSP_TDC_TYPE_CONN_CAP (0x90)
124#define URSP_TDC_TYPE_DST_FQDN (0x91)
125#define URSP_TDC_TYPE_OS_APP_ID (0xA0)
126// => => Length of traffic descriptor component value field
127#define URSP_TDC_LEN_MATCH_ALL (0)
128#define URSP_TDC_LEN_OS_ID (16) // UUID in RFC 4122
129#define URSP_TDC_LEN_IPV4_REMOTE_ADDR (4)
130#define URSP_TDC_LEN_IPV4_REMOTE_MASK (4)
131#define URSP_TDC_LEN_IPV6_REMOTE_ADDR (16)
132#define URSP_TDC_LEN_IPV6_PREFIX_LEN (1)
133#define URSP_TDC_LEN_IPV4_PROT_ID (1)
134#define URSP_TDC_LEN_IPV6_NEXT_HDR (1)
135#define URSP_TDC_LEN_SINGLE_REMOTE_PORT (2)
136#define URSP_TDC_LEN_PORT_RANGE_LOW_LIMIT (2)
137#define URSP_TDC_LEN_PORT_RANGE_HIGH_LIMIT (2)
138#define URSP_TDC_LEN_IP_3_TUPLE (22) // max{(IPV4_REMOTE_ADDR, IPV4_REMOTE_MASK), (IPV6_REMOTE_ADDR, IPV6_PREFIX_LEN)} + IPV4_PROT_ID/IPV6_NEXT_HDR + max{SINGLE_REMOTE_PORT, (PORT_RANGE_LOW_LIMIT, PORT_RANGE_HIGH_LIMIT)}
139#define URSP_TDC_LEN_SEC_PARAM_IDX (4)
140#define URSP_TDC_LEN_TYPE_OF_SVC (1)
141#define URSP_TDC_LEN_TFC_CLASS (1)
142#define URSP_TDC_LEN_TYPE_OF_SVC_MASK (1)
143#define URSP_TDC_LEN_TFC_CLASS_MASK (1)
144#define URSP_TDC_LEN_FLOW_LABEL (3)
145#define URSP_TDC_LEN_DST_MAC_ADDR (6)
146#define URSP_TDC_LEN_C_TAG_VID (2)
147#define URSP_TDC_LEN_S_TAG_VID (2)
148#define URSP_TDC_LEN_C_TAG_PCP_DEI (1)
149#define URSP_TDC_LEN_S_TAG_PCP_DEI (1)
150#define URSP_TDC_LEN_ETH_TYPE (2)
151#define URSP_TDC_LEN_DNN (URSP_DNN_SIZE)
152#define URSP_TDC_LEN_CONN_CAP (255)
153#define URSP_TDC_LEN_DST_FQDN (255)
154#define URSP_TDC_LEN_OS_APP_ID (255)
155// => => Route selection descriptor component type identifier
156#define URSP_RSDC_TYPE_SSC_MODE (0x01)
157#define URSP_RSDC_TYPE_S_NSSAI (0x02)
158#define URSP_RSDC_TYPE_DNN (0x04)
159#define URSP_RSDC_TYPE_PDU_SESSION_TYPE (0x08)
160#define URSP_RSDC_TYPE_PREF_ACCESS_TYPE (0x10)
161#define URSP_RSDC_TYPE_MULTI_ACCESS_PREF (0x11)
162#define URSP_RSDC_TYPE_NON_SEAMLESS_NON_3GPP_OFFLOAD_IND (0x20)
163#define URSP_RSDC_TYPE_LOC_CRITERIA (0x40)
164#define URSP_RSDC_TYPE_TIME_WIN (0x80)
165// => => Length of route selection descriptor component value field
166#define URSP_RSDC_LEN_SSC_MODE (1)
167#define URSP_RSDC_LEN_S_NSSAI (8) // S-NSSAI in TS 24.501
168#define URSP_RSDC_LEN_DNN (URSP_DNN_SIZE)
169#define URSP_RSDC_LEN_PDU_SESSION_TYPE (1)
170#define URSP_RSDC_LEN_PREF_ACCESS_TYPE (1)
yu.dongc592bc72024-04-24 22:45:13 -0700171#define URSP_RSDC_LEN_MULTI_ACCESS_PREF (0)
rjw6c1fd8f2022-11-30 14:33:01 +0800172#define URSP_RSDC_LEN_NON_SEAMLESS_NON_3GPP_OFFLOAD_IND (0)
173
174// APIs
175// N/A
176
177#endif