Path: blob/main/crypto/krb5/src/ccapi/common/win/tls.h
39566 views
/* ccapi/common/win/tls.h */1/*2* Copyright 2008 Massachusetts Institute of Technology.3* All Rights Reserved.4*5* Export of this software from the United States of America may6* require a specific license from the United States Government.7* It is the responsibility of any person or organization contemplating8* export to obtain such a license before exporting.9*10* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and11* distribute this software and its documentation for any purpose and12* without fee is hereby granted, provided that the above copyright13* notice appear in all copies and that both that copyright notice and14* this permission notice appear in supporting documentation, and that15* the name of M.I.T. not be used in advertising or publicity pertaining16* to distribution of the software without specific, written prior17* permission. Furthermore if you modify this software you must label18* your software as modified software and not distribute it in such a19* fashion that it might be confused with the original M.I.T. software.20* M.I.T. makes no representations about the suitability of21* this software for any purpose. It is provided "as is" without express22* or implied warranty.23*/2425/* Thread local storage for client threads. */2627#ifndef _tls_h28#define _tls_h2930#include "windows.h"31#include "time.h"32#include "rpc.h"3334#include "k5-ipc_stream.h"3536#define UUID_SIZE 1283738/* The client code can be run in any client thread.39The thread-specific data is defined here.40*/4142struct tspdata {43BOOL _listening;44BOOL _CCAPI_Connected;45RPC_ASYNC_STATE* _rpcState;46HANDLE _replyEvent;47time_t _sst;48k5_ipc_stream _stream;49char _uuid[UUID_SIZE];50};5152void tspdata_setListening (struct tspdata* p, BOOL b);53void tspdata_setConnected (struct tspdata* p, BOOL b);54void tspdata_setReplyEvent(struct tspdata* p, HANDLE h);55void tspdata_setRpcAState (struct tspdata* p, RPC_ASYNC_STATE* rpcState);56void tspdata_setSST (struct tspdata* p, time_t t);57void tspdata_setStream (struct tspdata* p, k5_ipc_stream s);58void tspdata_setUUID (struct tspdata* p, unsigned char __RPC_FAR* uuidString);59HANDLE tspdata_getReplyEvent(const struct tspdata* p);6061BOOL tspdata_getListening(const struct tspdata* p);62BOOL tspdata_getConnected(const struct tspdata* p);63RPC_ASYNC_STATE* tspdata_getRpcAState(const struct tspdata* p);64time_t tspdata_getSST (const struct tspdata* p);65k5_ipc_stream tspdata_getStream (const struct tspdata* p);66char* tspdata_getUUID (const struct tspdata* p);6768BOOL WINAPI GetTspData(DWORD tlsIndex, struct tspdata** pdw);6970#endif _tls_h717273