blob: 94b35f9c6488117e5cedb06a3b53d68f8c370702 [file] [log] [blame]
/*****************************************************************************
*
* Copyright (c) 2019, MediaTek Inc. All rights reserved.
* This software/firmware and related documentation ("MediaTek Software") are
* protected under relevant copyright laws. The information contained herein is
* confidential and proprietary to MediaTek Inc. and/or its licensors. Except as
* otherwise provided in the applicable licensing terms with MediaTek Inc.
* and/or its licensors, any reproduction, modification, use or disclosure of
* MediaTek Software, and information contained herein, in whole or in part,
* shall be strictly prohibited.
*
*****************************************************************************/
#ifndef __URSP_PUBLIC_DEFS_H__
#define __URSP_PUBLIC_DEFS_H__
#include "d2pm_public_defs.h"
// Type denifitions
typedef enum
{
URSP_RES_FAIL = -1,
URSP_RES_NONE,
URSP_RES_SUCC,
URSP_RES_MAX = 0x7FFFFFFF
}ursp_res_enum;
typedef enum
{
URSP_ROUTE_SUPP_PROFILE_TYPE_NONE = 0,
URSP_ROUTE_SUPP_PROFILE_TYPE_REQ,
URSP_ROUTE_SUPP_PROFILE_TYPE_MAX = 0x7FFFFFFF
}ursp_route_supp_profile_type_enum;
typedef enum
{
URSP_REEVAL_EVENT_NONE = 0,
URSP_REEVAL_EVENT_PERIODIC,
URSP_REEVAL_EVENT_PDU_REL,
URSP_REEVAL_EVENT_PCF_UPDATE,
URSP_REEVAL_EVENT_INTER_SYS,
URSP_REEVAL_EVENT_REG,
URSP_REEVAL_EVENT_WLAN_EST,
URSP_REEVAL_EVENT_WLAN_REL,
URSP_REEVAL_EVENT_ALLOWED_NSSAI,
URSP_REEVAL_EVENT_LADN,
URSP_REEVAL_EVENT_MAX = 0x7FFFFFFF
}ursp_reeval_event_enum;
// => Internal
#if 0
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
#endif
// Macro
#define URSP_CID_BITMAP_SIZE (D2PM_CID_BITMAP_SIZE)
#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
#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
// => LADN
#define URSP_MAX_LADN_DNN_NUM (8)
#define URSP_LADN_DNN_DELIM "\x1F"
#define URSP_LDAN_DNN_BITMAP_SIZE (((URSP_MAX_LADN_DNN_NUM - 1) >> 3) + 1)
// => Evaluation Flags
#define URSP_EVAL_FLAG_NONE (0x00000000)
#define URSP_EVAL_MATCH_ALL_DISALLOW (0x00000001)
// => Route attributes
#define URSP_ROUTE_ATTR_NONE (0x00000000)
#define URSP_ROUTE_ATTR_MATCH_ALL (0x00000001)
#define URSP_ROUTE_ATTR_UE_LOCAL_CONF (0x00000002)
// => Internal
#define URSP_DNN_SIZE (100) // APN in TS 23.003
// => => Traffic descriptor component type identifier
#define URSP_TDC_TYPE_MATCH_ALL (0x01)
#define URSP_TDC_TYPE_OS_ID (0x08)
#define URSP_TDC_TYPE_IPV4_REMOTE_ADDR (0x10)
#define URSP_TDC_TYPE_IPV6_REMOTE_ADDR (0x21)
#define URSP_TDC_TYPE_IPV4_PROT_ID (0x30)
#define URSP_TDC_TYPE_IPV6_NEXT_HDR (0x30)
#define URSP_TDC_TYPE_SINGLE_REMOTE_PORT (0x50)
#define URSP_TDC_TYPE_REMOTE_PORT_RANGE (0x51)
#define URSP_TDC_TYPE_IP_3_TUPLE (0x52)
#define URSP_TDC_TYPE_SEC_PARAM_IDX (0x60)
#define URSP_TDC_TYPE_TYPE_OF_SVC (0x70)
#define URSP_TDC_TYPE_TFC_CLASS (0x70)
#define URSP_TDC_TYPE_FLOW_LABEL (0x80)
#define URSP_TDC_TYPE_DST_MAC_ADDR (0x81)
#define URSP_TDC_TYPE_C_TAG_VID (0x83)
#define URSP_TDC_TYPE_S_TAG_VID (0x84)
#define URSP_TDC_TYPE_C_TAG_PCP_DEI (0x85)
#define URSP_TDC_TYPE_S_TAG_PCP_DEI (0x86)
#define URSP_TDC_TYPE_ETH_TYPE (0x87)
#define URSP_TDC_TYPE_DNN (0x88)
#define URSP_TDC_TYPE_CONN_CAP (0x90)
#define URSP_TDC_TYPE_DST_FQDN (0x91)
#define URSP_TDC_TYPE_OS_APP_ID (0xA0)
// => => Length of traffic descriptor component value field
#define URSP_TDC_LEN_MATCH_ALL (0)
#define URSP_TDC_LEN_OS_ID (16) // UUID in RFC 4122
#define URSP_TDC_LEN_IPV4_REMOTE_ADDR (4)
#define URSP_TDC_LEN_IPV4_REMOTE_MASK (4)
#define URSP_TDC_LEN_IPV6_REMOTE_ADDR (16)
#define URSP_TDC_LEN_IPV6_PREFIX_LEN (1)
#define URSP_TDC_LEN_IPV4_PROT_ID (1)
#define URSP_TDC_LEN_IPV6_NEXT_HDR (1)
#define URSP_TDC_LEN_SINGLE_REMOTE_PORT (2)
#define URSP_TDC_LEN_PORT_RANGE_LOW_LIMIT (2)
#define URSP_TDC_LEN_PORT_RANGE_HIGH_LIMIT (2)
#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)}
#define URSP_TDC_LEN_SEC_PARAM_IDX (4)
#define URSP_TDC_LEN_TYPE_OF_SVC (1)
#define URSP_TDC_LEN_TFC_CLASS (1)
#define URSP_TDC_LEN_TYPE_OF_SVC_MASK (1)
#define URSP_TDC_LEN_TFC_CLASS_MASK (1)
#define URSP_TDC_LEN_FLOW_LABEL (3)
#define URSP_TDC_LEN_DST_MAC_ADDR (6)
#define URSP_TDC_LEN_C_TAG_VID (2)
#define URSP_TDC_LEN_S_TAG_VID (2)
#define URSP_TDC_LEN_C_TAG_PCP_DEI (1)
#define URSP_TDC_LEN_S_TAG_PCP_DEI (1)
#define URSP_TDC_LEN_ETH_TYPE (2)
#define URSP_TDC_LEN_DNN (URSP_DNN_SIZE)
#define URSP_TDC_LEN_CONN_CAP (255)
#define URSP_TDC_LEN_DST_FQDN (255)
#define URSP_TDC_LEN_OS_APP_ID (255)
// => => Route selection descriptor component type identifier
#define URSP_RSDC_TYPE_SSC_MODE (0x01)
#define URSP_RSDC_TYPE_S_NSSAI (0x02)
#define URSP_RSDC_TYPE_DNN (0x04)
#define URSP_RSDC_TYPE_PDU_SESSION_TYPE (0x08)
#define URSP_RSDC_TYPE_PREF_ACCESS_TYPE (0x10)
#define URSP_RSDC_TYPE_MULTI_ACCESS_PREF (0x11)
#define URSP_RSDC_TYPE_NON_SEAMLESS_NON_3GPP_OFFLOAD_IND (0x20)
#define URSP_RSDC_TYPE_LOC_CRITERIA (0x40)
#define URSP_RSDC_TYPE_TIME_WIN (0x80)
// => => Length of route selection descriptor component value field
#define URSP_RSDC_LEN_SSC_MODE (1)
#define URSP_RSDC_LEN_S_NSSAI (8) // S-NSSAI in TS 24.501
#define URSP_RSDC_LEN_DNN (URSP_DNN_SIZE)
#define URSP_RSDC_LEN_PDU_SESSION_TYPE (1)
#define URSP_RSDC_LEN_PREF_ACCESS_TYPE (1)
#define URSP_RSDC_LEN_MULTI_ACCESS_PREF (0)
#define URSP_RSDC_LEN_NON_SEAMLESS_NON_3GPP_OFFLOAD_IND (0)
// APIs
// N/A
#endif