⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ospreauthreq.h

📁 radius协议源码÷The Radius Stack will connect to a Radius Server. This stack implementation is built upo
💻 H
字号:
/**########################################################################*########################################################################*########################################################################*                                                               *   COPYRIGHT (c) 1998, 1999 by TransNexus, LLC                          *                                                                    *   This software contains proprietary and confidential information  *   of TransNexus, LLC. Except as may be set forth in the license    *   agreement under which this software is supplied, use, disclosure, *   or reproduction is prohibited without the prior, express, written*   consent of TransNexus, LLC.                                      *                                     *******#########################################################################*#########################################################################*#########################################################################*//* * ospreauthreq.h - OSP reauthorisation request objects */#ifndef _OSPREAUTHREQ_H#define _OSPREAUTHREQ_H#include "osp.h"#include "ospxmlelem.h"#include "ospmsg.h"#include "ospcallid.h"#include "osptoken.h"#include "ospusage.h"#include "ospaltinfo.h"typedef struct{    OSPTTIME          ospmReauthReqTimestamp;    unsigned char    *ospmReauthReqMessageId;    unsigned char    *ospmReauthReqComponentId;    unsigned          ospmReauthReqRole;    unsigned          ospmReauthReqHasRole;    OSPTCALLID        *ospmReauthReqCallId;    unsigned char     ospmReauthReqSourceNumber[OSPC_E164NUMSIZE];    unsigned char     ospmReauthReqDestNumber[OSPC_E164NUMSIZE];    OSPTLIST          ospmReauthReqSourceAlternate;    OSPTLIST          ospmReauthReqDestinationAlternate;    OSPTTRXID         ospmReauthReqTrxId;    int               ospmReauthReqDuration;    OSPTLIST          ospmReauthReqTokens;    unsigned long     ospmReauthReqTNCustId;    unsigned long     ospmReauthReqTNDeviceId;}OSPTREAUTHREQ;/**//*-----------------------------------------------------------------------* * macros that emulate functions *-----------------------------------------------------------------------*//* * Note: all macros are also implemented as functions in ospreauthreq.c. * For implementation details, see the comments in that file. To replace * a macro with a true function, simply comment out the macro definition * below. */#ifndef OSPC_DEBUG#define OSPPReauthReqHasTimestamp(ospvReauthReq) \    (ospvReauthReq)?((ospvReauthReq)->ospmReauthReqTimestamp != OSPC_TIMEMIN):OSPC_FALSE#define OSPPReauthReqSetTimestamp(ospvReauthReq,ospvTime) \    (ospvReauthReq)->ospmReauthReqTimestamp = (ospvTime)#define OSPPReauthReqGetTimestamp(ospvReauthReq) (ospvReauthReq)->ospmReauthReqTimestamp/* ComponentId */#define OSPPReauthReqHasComponentId(ospvReauthReq) \    ((ospvReauthReq)->ospmReauthReqComponentId != OSPC_OSNULL)#define OSPPReauthReqGetComponentId(ospvReauthReq) \    (ospvReauthReq)->ospmReauthReqComponentId#define OSPPReauthReqHasCallId(ospvReauthReq) \    (ospvReauthReq)?((ospvReauthReq)->ospmReauthReqCallId != OSPC_OSNULL):OSPC_FALSE#define OSPPReauthReqGetCallId(ospvReauthReq) ((ospvReauthReq)->ospmReauthReqCallId)#define OSPPReauthReqSetSourceNumber(ospvReauthReq,ospvNum) \    OSPM_STRNCPY((ospvReauthReq)->ospmReauthReqSourceNumber, (ospvNum), \    OSPC_E164NUMSIZE-1)#define OSPPReauthReqGetSourceNumber(ospvReauthReq) (ospvReauthReq)?((ospvReauthReq)->ospmReauthReqSourceNumber):OSPC_OSNULL#define OSPPReauthReqSetDestNumber(ospvReauthReq,ospvNum) \    OSPM_STRNCPY((ospvReauthReq)->ospmReauthReqDestNumber, (ospvNum), \    OSPC_E164NUMSIZE-1)#define OSPPReauthReqGetDestNumber(ospvReauthReq) (ospvReauthReq)?((ospvReauthReq)->ospmReauthReqDestNumber):OSPC_OSNULL#define OSPPReauthReqHasTrxId(ospvReauthReq) (ospvReauthReq)?((ospvReauthReq)->ospmReauthReqTrxId > 0):OSPC_FALSE#define OSPPReauthReqSetTrxId(ospvReauthReq, ospvNum) \    (ospvReauthReq)->ospmReauthReqTrxId = ospvNum#define OSPPReauthReqGetTrxId(ospvReauthReq) ((ospvReauthReq)->ospmReauthReqTrxId)/* UsageDetail */#define OSPPReauthReqHasDuration(ospvReauthReq) \    (ospvReauthReq)?((ospvReauthReq)->ospmReauthReqDuration >= 0):OSPC_FALSE#define OSPPReauthReqSetDuration(ospvReauthReq,ospvDuration) \    (ospvReauthReq)->ospmReauthReqDuration = ospvDuration; \ #define OSPPReauthReqGetDuration(ospvReauthReq) \    (ospvReauthReq)?((ospvReauthReq)->ospmReauthReqDuration):0#define OSPPReauthReqAddToken(ospvReauthReq, ospvToken)   \    OSPPListAppend(&(ospvReauthReq)->ospmReauthReqTokens, (ospvToken))#define OSPPReauthReqFirstToken(ospvReauthReq) \    OSPPListFirst(&(ospvReauthReq)->ospmReauthReqTokens)#define OSPPReauthReqNextToken(ospvReauthReq, ospvToken) \    OSPPListNext(&(ospvReauthReq)->ospmReauthReqTokens, (ospvToken))#endif  /* NOT OSPC_DEBUG *//**//*-----------------------------------------------------------------------* * function prototypes *-----------------------------------------------------------------------*/#ifdef __cplusplusextern "C"{#endif    OSPTREAUTHREQ   *OSPPReauthReqNew(void);    void            OSPPReauthReqDelete(OSPTREAUTHREQ **);    int             OSPPReauthReqToElement(OSPTREAUTHREQ *, OSPTXMLELEM **);    void            OSPPReauthReqSetRole(OSPTREAUTHREQ *, OSPE_MSG_ROLETYPES);    unsigned        OSPPReauthReqHasRole(OSPTREAUTHREQ *);    OSPE_MSG_ROLETYPES  OSPPReauthReqGetRole(OSPTREAUTHREQ *);    void            OSPPReauthReqAddSourceAlt(OSPTREAUTHREQ *, OSPTALTINFO *);    void            OSPPReauthReqAddDestinationAlt(OSPTREAUTHREQ *, OSPTALTINFO *);            void            OSPPReauthReqSetCallId(OSPTREAUTHREQ *, OSPTCALLID *);    unsigned        OSPPReauthReqHasMessageId(OSPTREAUTHREQ *);    unsigned char  *OSPPReauthReqGetMessageId(OSPTREAUTHREQ *);#ifdef OSPC_DEBUG    unsigned    OSPPReauthReqHasTimestamp(OSPTREAUTHREQ *);    void        OSPPReauthReqSetTimestamp(OSPTREAUTHREQ *, OSPTTIME);    OSPTTIME    OSPPReauthReqGetTimestamp(OSPTREAUTHREQ *);    unsigned       OSPPReauthReqHasComponentId(OSPTREAUTHREQ *);    unsigned char  *OSPPReauthReqGetComponentId(OSPTREAUTHREQ *);    unsigned    OSPPReauthReqHasCallId(OSPTREAUTHREQ *);    OSPTCALLID *OSPPReauthReqGetCallId(OSPTREAUTHREQ *);    void        OSPPReauthReqSetSourceNumber(OSPTREAUTHREQ *, const unsigned char *);    const unsigned char *OSPPReauthReqGetSourceNumber(OSPTREAUTHREQ *);    void        OSPPReauthReqSetDestNumber(OSPTREAUTHREQ *, const unsigned char *);    const unsigned char *OSPPReauthReqGetDestNumber(OSPTREAUTHREQ *);    unsigned    OSPPReauthReqHasTrxId(OSPTREAUTHREQ *);    void        OSPPReauthReqSetTrxId(OSPTREAUTHREQ *, OSPTTRXID);    OSPTTRXID   OSPPReauthReqGetTrxId(OSPTREAUTHREQ *);    unsigned    OSPPReauthReqHasDuration(OSPTREAUTHREQ *);    void        OSPPReauthReqSetDuration(OSPTREAUTHREQ *, int ospvDuration);    int         OSPPReauthReqGetDuration(OSPTREAUTHREQ *);    void        OSPPReauthReqAddToken(OSPTREAUTHREQ *, OSPTTOKEN *);    OSPTTOKEN  *OSPPReauthReqFirstToken(OSPTREAUTHREQ *);    OSPTTOKEN  *OSPPReauthReqNextToken(OSPTREAUTHREQ *, OSPTTOKEN *);#endif  /* OSPC_DEBUG */    unsigned       OSPPReauthReqHasDestinationAlt(OSPTREAUTHREQ *);    OSPTALTINFO   *OSPPReauthReqFirstDestinationAlt(OSPTREAUTHREQ *);    OSPTALTINFO   *OSPPReauthReqNextDestinationAlt(OSPTREAUTHREQ *, OSPTALTINFO  *);    unsigned char *OSPPReauthReqGetDestinationAltValue(OSPTALTINFO *);    unsigned       OSPPReauthReqHasSourceAlt(OSPTREAUTHREQ *);    OSPTALTINFO   *OSPPReauthReqFirstSourceAlt(OSPTREAUTHREQ *);    OSPTALTINFO   *OSPPReauthReqNextSourceAlt(OSPTREAUTHREQ *, OSPTALTINFO  *);    unsigned       OSPPReauthReqHasTNCustId(OSPTREAUTHREQ *);    void           OSPPReauthReqSetTNCustId(OSPTREAUTHREQ *, unsigned long);    unsigned long  OSPPReauthReqGetTNCustId(OSPTREAUTHREQ *);    unsigned       OSPPReauthReqHasTNDeviceId(OSPTREAUTHREQ *);    void           OSPPReauthReqSetTNDeviceId(OSPTREAUTHREQ *, unsigned long);    unsigned long  OSPPReauthReqGetTNDeviceId(OSPTREAUTHREQ *);#ifdef __cplusplus}#endif#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -