/usr/include/osp/ospcomm.h is in libosptk3-dev 3.4.2-1.1.
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 | /**************************************************************************
*** 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 ***
*** ***
**************************************************************************/
/*
* ospcomm.h - Constants and prototypes for Comm object.
*/
#ifndef _OSP_COMM_H
#define _OSP_COMM_H
#include "osp/osp.h"
#include "osp/ospmsgque.h"
#include "osp/ospmsginfo.h"
#include "osp/ospsecurity.h"
#define OSPC_COMM_MULTI_MSG "multipart/signed; protocol=\"application/pkcs7-signature\"; micalg=sha1; boundary=bar"
#define OSPC_COMM_TEXT_MSG "text/plain"
#define OSPC_COMM_MAX_DEGRADED_TIME 60
#define OSPC_COMM_INUSE_BIT 1
#define OSPC_COMM_SPARE_CHARS 16
#define OSPC_COMM_SVCPT_SECURITY_BIT 0x01
#define OSPC_COMM_SVCPT_DEGRADED_BIT 0x02
#define OSPC_COMM_SHUTDOWN_BIT 0x01
#define OSPC_COMM_HTTPSHUTDOWN_BIT 0x02
#define OSPC_COMM_AUDIT_ON 0x04
#define OSPC_COMM_AUDIT_OFF 0xFB /* turn off auditing */
#define OSPC_COMM_DEFAULT_SECURE_PORT 443
#define OSPC_COMM_DEFAULT_NONSECURE_PORT 80
#define OSPM_COMM_SECURED_IO(sp) (sp->Flags & OSPC_COMM_SVCPT_SECURITY_BIT)
/*-------------------------------------------*/
/* service point typedef */
/*-------------------------------------------*/
typedef struct _OSPTSVCPT
{
OSPTLISTLINK Link;
OSPTIPADDR IpAddr; /* network byte order */
time_t DegradedTime;
unsigned Index;
unsigned short Port; /* network byte order */
unsigned char Flags; /* bit 1: 0 - http 1 - https */
/* bit 2: 0 - ok 1 - degraded */
char *HostName;
char *URI;
unsigned long MaxMsgAllowed;
} OSPTSVCPT;
/*-------------------------------------------*/
/* communication manager typedef */
/*-------------------------------------------*/
typedef struct _OSPTCOMM
{
OSPTMUTEX Mutex;
OSPTTHREADID ThreadId;
unsigned char Flags; /* bit 1: 0 - run 1 - commshutdown */
/* bit 2: 0 - run 1 - http shutdown */
/* bit 3: 0 - audit off 1- audit on */
OSPTMSGQUEUE *MsgQueue;
unsigned NumberOfServicePoints;
unsigned HttpMaxConnections;
unsigned HttpPersistence;
unsigned HttpRetryDelay;
unsigned HttpRetryLimit;
unsigned HttpTimeout;
OSPTUINT64 ConnSelectionTimeout;
OSPTSVCPT *ServicePointList;
OSPTSVCPT *AuditURL;
unsigned HttpConnCount;
struct _OSPTHTTP *HttpConnList;
int ShutdownTimeLimit;
OSPTSEC *Security;
int RoundRobinIndex;
OSPTMUTEX HttpSelectMutex;
OSPTCONDVAR HttpSelCondVar;
} OSPTCOMM;
#define OSPPCommAddTransaction(comm,msginfo) \
OSPPMsgQueueAddTransaction(comm->MsgQueue, msginfo)
#ifdef __cplusplus
extern "C"
{
#endif
int OSPPCommNew(OSPTCOMM **);
void OSPPCommDelete(OSPTCOMM **);
int OSPPCommGetPersistence(OSPTCOMM *, unsigned *);
int OSPPCommGetRetryDelay(OSPTCOMM *, unsigned *);
int OSPPCommGetRetryLimit(OSPTCOMM *, unsigned *);
int OSPPCommGetTimeout(OSPTCOMM *, unsigned *);
int OSPPCommSetPersistence(OSPTCOMM *, unsigned);
int OSPPCommSetRetryDelay(OSPTCOMM *, unsigned);
int OSPPCommSetRetryLimit(OSPTCOMM *, unsigned);
int OSPPCommSetTimeout(OSPTCOMM *, unsigned);
int OSPPCommSetConnSelectionTimeout(OSPTCOMM *, OSPTUINT64);
int OSPPCommGetMaxConnections(OSPTCOMM *, unsigned *);
int OSPPCommSetMaxConnections(OSPTCOMM *, unsigned);
int OSPPCommIncrementHttpConnCount(OSPTCOMM *);
int OSPPCommDecrementHttpConnCount(OSPTCOMM *);
int OSPPCommGetHttpConnCount(OSPTCOMM *, unsigned *);
int OSPPCommGetNumberOfServicePoints(OSPTCOMM *, unsigned *);
void OSPPCommGetServicePointList(OSPTCOMM *, OSPTSVCPT **);
int OSPPCommGetServicePoints(OSPTCOMM *, unsigned, unsigned, char *[]);
int OSPPCommSetServicePoints(OSPTCOMM *, unsigned, const char **);
int OSPPCommSetAuditURL(OSPTCOMM *, const char *);
void OSPPCommSetAuditFlag(OSPTCOMM *, unsigned);
int OSPPCommBuildServicePoint(OSPTSVCPT *, char *);
void OSPPCommSetShutdown(OSPTCOMM **, int );
void OSPPCommShutdownConnections(OSPTCOMM *, int);
void OSPPCommSetSecurity(OSPTCOMM *, OSPTSEC *);
OSPTSEC *OSPPCommGetSecurity(OSPTCOMM *);
void OSPPCommSignalAllConnections(OSPTCOMM *ospvComm);
int OSPPCommParseSvcPt(const char *ospvURL, OSPTSVCPT **ospvSvcPt, unsigned ospvIndex);
int OSPPCommValidateSvcPts(unsigned ospvNumberOfServicePoints, const char **ospvServicePoint);
int OSPPCommUpdateURLs(OSPTCOMM *, unsigned, const char **);
int OSPPCommGetNumberOfTransactions(OSPTCOMM *, unsigned *);
void OSPPHttpDecrementConnectionCount(OSPTCOMM *);
#ifdef __cplusplus
}
#endif
#endif
|