Files
veejay/veejay-current/veejay-server/libOSC/OSC-struct.h
Niels Elburg d8e6f98d53 Initial checkin of veejay 1.4
git-svn-id: svn://code.dyne.org/veejay/trunk@1172 eb8d1916-c9e9-0310-b8de-cf0c9472ead5
2008-11-10 20:16:24 +00:00

57 lines
1.6 KiB
C

#include <netinet/in.h>
#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#ifndef OSCH
#define OSCH
#ifndef TRUE
typedef int Boolean;
#define TRUE 1
#define FALSE 0
#endif
/* Fixed byte width types */
typedef int int4; /* 4 byte int */
typedef struct NetworkReturnAddressStruct_t {
struct sockaddr_in cl_addr; /* client information */
struct sockaddr_in my_addr; /* us */
int clilen;
int sockfd;
fd_set readfds;
struct timeval tv;
int fdmax;
} NetworkReturnAddressStruct;
typedef struct OSCPacketBuffer_struct {
char *buf; /* Contents of network packet go here */
int n; /* Overall size of packet */
int refcount; /* # queued things using memory from this buffer */
struct OSCPacketBuffer_struct *nextFree; /* For linked list of free packets */
Boolean returnAddrOK; /* Because returnAddr points to memory we need to
store future return addresses, we set this
field to FALSE in situations where a packet
buffer "has no return address" instead of
setting returnAddr to 0 */
void *returnAddr; /* Addr of client this packet is from */
/* This was of type NetworkReturnAddressPtr, but the constness
was making it impossible for me to initialize it. There's
probably a better way that I don't understand. */
} OSCPacketBuffer;
struct OSCReceiveMemoryTuner {
void *(*InitTimeMemoryAllocator)(int numBytes);
void *(*RealTimeMemoryAllocator)(int numBytes);
int receiveBufferSize;
int numReceiveBuffers;
int numQueuedObjects;
int numCallbackListNodes;
};
#endif