' ########################################################################################
' Microsoft Windows
' File: QosPol.inc
' Contents: QOS policy elements
' Copyright (c) 2011 Jos? Roca
' Portions Copyright (c) Microsoft Corporation.
' All Rights Reserved.
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
' EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
' MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
' ########################################################################################
#IF NOT %DEF(PBX_QosPol_PBI)
#DEFINE PBX_QosPol_PBI
%EQUATE `QOSPOL_INC = 1
%EQUATE `PE_TYPE_APPID = 3 ' // policy element contains Application Identity
'// Policy Location attribute carries sub application attributes
%EQUATE `PE_ATTRIB_TYPE_POLICY_LOCATOR = 1
%EQUATE `POLICY_LOCATOR_SUB_TYPE_ASCII_DN = 1
%EQUATE `POLICY_LOCATOR_SUB_TYPE_UNICODE_DN = 2
%EQUATE `POLICY_LOCATOR_SUB_TYPE_ASCII_DN_ENC = 3
%EQUATE `POLICY_LOCATOR_SUB_TYPE_UNICODE_DN_ENC = 4
'// Credentials attribute carries the application identity
%EQUATE `PE_ATTRIB_TYPE_CREDENTIAL = 2
%EQUATE `CREDENTIAL_SUB_TYPE_ASCII_ID = 1
%EQUATE `CREDENTIAL_SUB_TYPE_UNICODE_ID = 2
%EQUATE `CREDENTIAL_SUB_TYPE_KERBEROS_TKT = 3
%EQUATE `CREDENTIAL_SUB_TYPE_X509_V3_CERT = 4
%EQUATE `CREDENTIAL_SUB_TYPE_PGP_CERT = 5
'// Identity Policy Element attribute structure
' // Size = 8 bytes
TYPE IDPE_ATTR BYTE
 PeAttribLength AS WORD ' USHORT
 PeAttribType AS BYTE ' UCHAR // Use the #defines from above
 PeAttribSubType AS BYTE ' UCHAR // Use the #defines from above
 PeAttribValue(3) AS BYTE ' UCHAR
END TYPE
'#define IDPE_ATTR_HDR_LEN (sizeof(USHORT)+sizeof(UCHAR)+sizeof(UCHAR))
%EQUATE `IDPE_ATTR_HDR_LEN = 2 + 1 + 1
'#define RSVP_BYTE_MULTIPLE(x) (((x+3) / 4) * 4)
MACRO RSVP_BYTE_MULTIPLE(x) = (((x+3) \ 4) * 4)
#ENDIF
