This file is indexed.

/usr/include/osp/osptrans.h is in libosptk-dev 4.13.0-1build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
/**************************************************************************
*** COPYRIGHT (c) 2002 by TransNexus, Inc.                              ***
***                                                                     ***
*** This software is property of TransNexus, Inc.                       ***
*** This software is freely available under license from TransNexus.    ***
*** The license terms and conditions for free use of this software by   ***
*** third parties are defined in the OSP Toolkit Software License       ***
*** Agreement (LICENSE.txt).  Any use of this software by third         ***
*** parties, which does not comply with the terms and conditions of the ***
*** OSP Toolkit Software License Agreement is prohibited without        ***
*** the prior, express, written consent of TransNexus, Inc.             ***
***                                                                     ***
*** Thank you for using the OSP ToolKit(TM).  Please report any bugs,   ***
*** suggestions or feedback to support@transnexus.com                   ***
***                                                                     ***
**************************************************************************/

/* osptrans.h - Constants and prototypes for global transaction functions. */
#ifndef _OSPTRANS_H
#define _OSPTRANS_H

#include "osp/osp.h"
#include "osp/ospauthreq.h"
#include "osp/ospauthrsp.h"
#include "osp/ospmsginfo.h"
#include "osp/ospauthind.h"
#include "osp/ospauthcnf.h"
#include "osp/ospusageind.h"
#include "osp/ospusagecnf.h"
#include "osp/ospreauthreq.h"
#include "osp/ospreauthrsp.h"
#include "osp/ospstatistics.h"
#include "osp/ospcapcnf.h"
#include "osp/ospmsg.h"
#include "osp/ospfail.h"
#include "osp/osptokeninfo.h"
#include "osp/ospstir.h"

/* Transaction States */
typedef enum {
    OSPC_INVALID_STATE,
    OSPC_TRANSNEW,
    OSPC_AUTH_REQUEST_BLOCK,
    OSPC_AUTH_REQUEST_FAIL,
    OSPC_AUTH_REQUEST_SUCCESS,
    OSPC_CAP_IND_BLOCK,
    OSPC_CAP_IND_FAIL,
    OSPC_CAP_IND_SUCCESS,
    OSPC_VALIDATE_AUTH_FAIL,
    OSPC_VALIDATE_AUTH_SUCCESS,
    OSPC_GET_DEST_FAIL,
    OSPC_GET_DEST_SUCCESS,
    OSPC_REPORT_USAGE_BLOCK,
    OSPC_REPORT_USAGE_FAIL,
    OSPC_REPORT_USAGE_SUCCESS,
    OSPC_INITIALIZE_SUCCESS,
    OSPC_INITIALIZE_FAIL,
    OSPC_REINITIALIZE_SUCCESS,
    OSPC_REINITIALIZE_FAIL,
    OSPC_ACCUMULATE_SUCCESS,
    OSPC_ACCUMULATE_FAIL
} OSPE_TRANS_STATE;

#define MAX_PRICING_INFO_ALLOWED 10

/* transaction typedef */
typedef struct _OSPTTRANS {
    struct _OSPTPROVIDER *Provider;
    OSPT_AUTH_REQ *AuthReq;
    OSPT_AUTH_RSP *AuthRsp;
    OSPT_DEST *CurrentDest;
    OSPT_AUTH_IND *AuthInd;
    OSPT_AUTH_CNF *AuthCnf;
    OSPTLIST UsageInd;          /* list of OSPT_USAGEIND */
    OSPT_USAGE_CNF *UsageCnf;
    OSPT_CAP_CNF *CapCnf;
    OSPE_TRANS_STATE State;
    OSPTUINT64 TransactionID;
    OSPTBOOL HasTransactionID;
    OSPTBOOL HasGetDestSucceeded;
    unsigned Counter;
    unsigned Duration;
    /* These two network ID's are only used to set network ID */
    char *SrcNetworkId;
    char *DestNetworkId;
    unsigned SizeOfDetailLog;
    void *DetailLog;
    OSPT_STATS *Statistics;
    OSPT_REAUTH_REQ *ReauthReq;
    OSPT_REAUTH_RSP *ReauthRsp;
    OSPTBOOL WasLookAheadInfoGivenToApp;
    OSPTBOOL TokenInfoHasLookAheadInfo;
    OSPTTOKENLOOKAHEADINFO TokenLookAheadInfo;
    OSPE_NUMBER_FORMAT CallingNumberFormat;
    OSPE_NUMBER_FORMAT CalledNumberFormat;
    OSPTBOOL HasServiceInfo;
    OSPE_SERVICE ServiceType;
    OSPTBOOL HasPricingInfo;
    unsigned NumOfPricingInfoElements;
    unsigned CurrentPricingInfoElement;
    OSPT_PRICING_INFO PricingInfo[MAX_PRICING_INFO_ALLOWED];
    char NPRn[OSPC_SIZE_E164NUM];
    char NPCic[OSPC_SIZE_NORID];
    int NPNpdi;
    char OpName[OSPC_OPNAME_NUMBER][OSPC_SIZE_NORID];
    OSPE_PROTOCOL_NAME Protocol[OSPC_PROTTYPE_NUMBER];
    char Codec[OSPC_SERVICE_NUMBER][OSPC_CODEC_NUMBER][OSPC_SIZE_CODEC];
    OSPT_CALL_ID *SessionId[OSPC_SESSIONID_NUMBER];
    char *CustomInfo[OSPC_MAX_INDEX];
    /* This source network ID is only used to report usage */
    char UsageSrcNetworkId[OSPC_SIZE_NORID];
    char SrcRealm[OSPC_SIZE_NORSTR];
    char DestRealm[OSPC_SIZE_NORSTR];
    char SipHeader[OSPC_SIPHEADER_NUMBER][OSPC_NFORMAT_NUMBER][OSPC_SIZE_URL];
    char DivDevInfo[OSPC_SIZE_SIGNALADDR];
    char ApplicationId[OSPC_SIZE_NORSTR];
    OSPE_ROLE_STATE RoleState;
    OSPE_ROLE_FORMAT RoleFormat;
    OSPE_ROLE_VENDOR RoleVendor;
    OSPE_NUMBER_FORMAT NetworkTranslatedCalledFormat;
    char NetworkTranslatedCalled[OSPC_SIZE_E164NUM];
    char SrcServiceProvider[OSPC_SIZE_NORSTR];
    char SystemId[OSPC_SIZE_NORSTR];
    char RelatedReason[OSPC_SIZE_NORSTR];
    int TotalSetupAttempts;
    char CDRProxyHost[OSPC_SIZE_NORSTR];
    char CDRProxyFolder[OSPC_SIZE_NORSTR];
    char CDRProxySubfolder[OSPC_SIZE_NORSTR];
    char UserAgent[OSPC_SIZE_NORSTR];
    char SrcAudioAddr[OSPC_SIZE_NORSTR];
    char SrcVideoAddr[OSPC_SIZE_NORSTR];
    char ProxyIngressAddr[OSPC_SIZE_NORSTR];
    char JIP[OSPC_SIZE_NORSTR];
    OSPT_CALL_PARTY CallingParty;
    OSPTTIME RequestDate;
    OSPTLIST SDPFingerPrint;
    OSPT_IDENTITY Identity;
    char SrcSwitchId[OSPC_SIZE_NORID];
    char PCVICID[OSPC_SIZE_NORSTR];
} OSPTTRANS;

#define OSPC_MAX_TRANS  20000

/* transaction collection typedef */
typedef struct _OSPTTRANCOLLECTION {
    OSPTTRANS *Trans[OSPC_MAX_TRANS];
    unsigned NumberOfTrans;
    OSPTMUTEX TransactionMutex;
} OSPTTRANCOLLECTION;

/* Types for parsing and creating forms */
#define OSPC_USAGE      0x01
#define OSPC_AUTH       0x02
#define OSPC_REAUTH     0x03

/* Transaction Mask */
#define OSPC_TRANSACTIONMASK        0xFFFFFF

#define OSPC_TRAN_TIME_UNLIMITED    0

#define OSPC_TRAN_HANDLE_INVALID    -1

/* MACROS */
#define OSPM_GET_TRANSACTION_INDEX(e)   (e & OSPC_TRANSACTIONMASK);

/* Function Prototypes */
#ifdef __cplusplus
extern "C" {
#endif

    int OSPPTransactionBuildReauthRequest(OSPTTRANS *, unsigned);
    int OSPPTransactionBuildUsage(OSPTTRANS *, OSPT_USAGE_IND **, OSPT_DEST *, OSPE_MESSAGE);
    OSPTTRANS *OSPPTransactionCollectionGetItem(OSPTTRANCOLLECTION *, OSPTCOLLECTIONINDEX);
    OSPTTRANHANDLE OSPPTransactionCollectionGetNewItem(OSPTPROVHANDLE, OSPTTRANCOLLECTION *, int *);
    void OSPPTransactionCollectionRemoveItem(OSPTTRANCOLLECTION *, OSPTCOLLECTIONINDEX);
    void OSPPTransactionDeleteRequest(OSPTTRANS *);
    void OSPPTransactionDeleteResponse(OSPTTRANS *);
    void OSPPTransactionDeleteAuthInd(OSPTTRANS *);
    void OSPPTransactionDeleteAuthCnf(OSPTTRANS *);
    void OSPPTransactionDeleteUsageInd(OSPTTRANS *);
    void OSPPTransactionDeleteUsageCnf(OSPTTRANS *);
    void OSPPTransactionDeleteStatistics(OSPTTRANS *);
    void OSPPTransactionDeleteReauthReq(OSPTTRANS *);
    void OSPPTransactionDeleteReauthRsp(OSPTTRANS *);
    void OSPPTransactionDeleteCapCnf(OSPTTRANS *);
    void OSPPTransactionGetAccumAllowed(OSPTTRANS *, OSPTBOOL *);
    OSPTTRANS *OSPPTransactionGetContext(OSPTTRANHANDLE, int *);
    int OSPPTransactionGetCounter(OSPTTRANS *);
    void OSPPTransactionGetDeleteAllowed(OSPTTRANS *, OSPTBOOL *);
    void OSPPTransactionGetIsModifyDeviceIdAllowed(OSPTTRANS *, OSPTBOOL *);
    int OSPPTransactionGetDestAllowed(OSPTTRANS *);
    int OSPPTransactionGetDestination(OSPTTRANS *, OSPEFAILREASON, unsigned, char *, char *, unsigned *, unsigned *,
            void *, unsigned, char *, unsigned, char *, unsigned, char *, unsigned, char *, unsigned *, void *);
    int OSPPTransactionGetNewContext(OSPTPROVHANDLE, OSPTTRANHANDLE *);
    int OSPPTransactionGetProvider(OSPTTRANS *, struct _OSPTPROVIDER **);
    void OSPPTransactionGetReportUsageAllowed(OSPTTRANS *, OSPTBOOL *);
    void OSPPTransactionGetState(OSPTTRANS *, OSPE_TRANS_STATE *);
    void OSPPTransactionGetStatistics(OSPTTRANS *, OSPT_STATS *);
    OSPTBOOL OSPPTransactionHasStatistics(OSPTTRANS *);
    int OSPPTransactionPrepareAndQueMessage(OSPTTRANS *, unsigned char *, unsigned, OSPT_MSG_INFO **);
    int OSPPTransactionProcessReturn(OSPTTRANS *, OSPT_MSG_INFO *);
    int OSPPTransactionRequestNew(OSPTTRANS *, const char *, const char *, const char *, const char *, const char *, unsigned,
            OSPT_CALL_ID *[], const char *[], unsigned *, unsigned *, void *);
    int OSPPTransactionResponseBuild(OSPTTRANS *, const char *, const char *, unsigned, const void *, unsigned, const void *);
    int OSPPTransactionSetProvider(OSPTTRANS *, struct _OSPTPROVIDER *);
    void OSPPTransactionSetState(OSPTTRANS *, OSPE_TRANS_STATE);
    void OSPPTransactionUpdateCounter(OSPTTRANS *);
    int OSPPTransactionValidateTokenCert(OSPTTRANS *, unsigned char *, unsigned);
    int OSPPTransactionVerifyAuthCnf(OSPT_AUTH_CNF *);
    int OSPPTransactionVerifyUsageCnf(OSPT_USAGE_CNF *);

#ifdef __cplusplus
}
#endif

#endif /* _OSPTRANS_H */