Main Page   Compound List   File List   Compound Members   File Members  

speakfree.h File Reference

#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <assert.h>
#include <string.h>
#include <ctype.h>
#include <time.h>
#include <curses.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/wait.h>
#include <sys/stat.h>
#include <unistd.h>
#include <errno.h>
#include <signal.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include "types.h"
#include "aes.h"
#include "blowfish.h"
#include "des.h"
#include "des_sf.h"
#include "idea.h"
#include "ulaw2linear.h"
#include "adpcm-u.h"
#include "celp.h"
#include "lpc.h"
#include "gsm.h"
#include "lpc10.h"
#include "md5.h"
#include "rtp.h"
#include "rtpacket.h"
#include "audio_descr.h"
#include "common.h"
#include "vox.h"

Go to the source code of this file.

Compounds

struct  connection
struct  sbhead
struct  soundbuf

Defines

#define RTP_SUPPORT
#define PUSH_TO_TALK
#define FACE_SET_GEOMETRY
#define NAT_LAUNCH
#define NOLONGLONG
#define CRYPTO
#define AES_BLOCK_SIZE   BLOCK_SIZE
#define SAMPLE_RATE   8000
#define TINY_PACKETS   512
#define FACEDIR   "/tmp/"
#define BUFL   8000
#define LONG   long
#define AUDIO_DEVICE_FILE
#define LPC_FRAME_SIZE   160
#define V   (void)
#define ELEMENTS(array)   (sizeof(array)/sizeof((array)[0]))
#define fComp2X   1
#define fDebug   2
#define fSetDest   4
#define fDestSpkr   0
#define fDestJack   8
#define fLoopBack   16
#define fCompGSM   32
#define fEncDES   64
#define fEncOTP   128
#define fEncIDEA   256
#define fCompADPCM   512
#define fEncPGP   1024
#define fKeyPGP   2048
#define fCompLPC   4096
#define fFaceData   8192
#define fFaceOffer   16384
#define fCompVOX   0x10000
#define fCompLPC10   0x20000
#define fCompRobust   0x40000
#define fEncBF   0x80000
#define fCompCELP   0x100000
#define fEncAES   0x200000
#define fProtocol   0x40000000
#define faceRequest   1
#define faceReply   2
#define faceLess   4
#define fCompressionModes   (fComp2X | fCompGSM | fCompADPCM | fCompLPC | fCompLPC10 | fCompCELP)
#define isEncrypted(x)   (((x) & (fEncDES | fEncOTP | fEncOTP | fEncPGP)) != 0)
#define fHalfDuplex   0x10000000
#define isSoundPacket(c)   (((c) & (fFaceData | fKeyPGP | fHalfDuplex)) == 0)
#define FSinit   0
#define FSrequest   1
#define FSreply   2
#define FScomplete   3
#define FSabandoned   4
#define FaceFetchInterval   250000
#define FaceTimeout   (FaceFetchInterval * 20)
#define FaceMaxRetries   10
#define PROTOCOL_SPEAKFREE   0
#define PROTOCOL_VAT   1
#define PROTOCOL_RTP   2
#define PROTOCOL_VATRTP_CRYPT   3
#define PROTOCOL_UNKNOWN   4
#define RTCP_APP_TEXT_CHAT   "SFtc"
#define LWL_MAX_SITES   5

Typedefs

typedef soundbuf soundbuf
typedef sbhead sbhead

Functions

void adpcmdecomp (struct soundbuf *sb)
char * StrReplace (char *Str, char *OldStr, char *NewStr)
void string_DES_key (char *key, unsigned char des_key[8], char algorithm[16])
unsigned char alaw2ulaw (unsigned char aval)
void outHTML (FILE *fp, char *s)
void rate_start (int inrate, int outrate)
void rate_flow (unsigned char *ibuf, unsigned char *obuf, int *isamp, int *osamp)
int isrtp (unsigned char *pkt, int len)
int isValidRTCPpacket (unsigned char *p, int len)
int isRTCPByepacket (unsigned char *p, int len)
int isRTCPAPPpacket (unsigned char *p, int len, char *name, unsigned char **app_ptr)
int rtp_make_sdes (char **pkt, unsigned long ssrc_i, int port, int strict)
int rtp_make_bye (unsigned char *p, unsigned long ssrc_i, char *raison, int strict)
int rtp_make_app (unsigned char *p, unsigned long ssrc_i, int strict, char *type, char *content)
int rtpout (soundbuf *sb, unsigned long ssrc_i, unsigned long timestamp_i, unsigned short seq_i, int spurt)
int parseSDES (unsigned char *packet, struct rtcp_sdes_request *r)
void copySDESitem (char *s, char *d)
void setaubufsize (int size)
int soundinit (int iomode)
void soundterm (void)
void sound_open_file_descriptors (int *audio_io, int *audio_ctl)
void soundplay (int len, unsigned char *buf)
void soundplayvol (int value)
void soundrecgain (int value)
void sounddest (int where)
int soundgrab (char *buf, int len)
void soundflush (void)
FILE * create_tempfile (char *temp_filename_pattern, const int uMask, const int unLink)
FILE * create_tempfile_in_tempdir (const char *tag, char **genName, const int uMask, const int unLink)
void sf_usleep (unsigned t)
int isvat (unsigned char *pkt, int len)
int vatout (soundbuf *sb, unsigned long ssrc_i, unsigned long timestamp_i, int spurt)
int makeVATid (char **vp, unsigned long ssrc_i)
int makevatdone (char *v, unsigned long ssrc_i)


Define Documentation

#define AES_BLOCK_SIZE   BLOCK_SIZE
 

#define AUDIO_DEVICE_FILE
 

#define BUFL   8000
 

#define CRYPTO
 

#define ELEMENTS array       (sizeof(array)/sizeof((array)[0]))
 

#define FACE_SET_GEOMETRY
 

#define FACEDIR   "/tmp/"
 

#define FaceFetchInterval   250000
 

#define faceLess   4
 

#define FaceMaxRetries   10
 

#define faceReply   2
 

#define faceRequest   1
 

#define FaceTimeout   (FaceFetchInterval * 20)
 

#define fComp2X   1
 

#define fCompADPCM   512
 

#define fCompCELP   0x100000
 

#define fCompGSM   32
 

#define fCompLPC   4096
 

#define fCompLPC10   0x20000
 

#define fCompressionModes   (fComp2X | fCompGSM | fCompADPCM | fCompLPC | fCompLPC10 | fCompCELP)
 

#define fCompRobust   0x40000
 

#define fCompVOX   0x10000
 

#define fDebug   2
 

#define fDestJack   8
 

#define fDestSpkr   0
 

#define fEncAES   0x200000
 

#define fEncBF   0x80000
 

#define fEncDES   64
 

#define fEncIDEA   256
 

#define fEncOTP   128
 

#define fEncPGP   1024
 

#define fFaceData   8192
 

#define fFaceOffer   16384
 

#define fHalfDuplex   0x10000000
 

#define fKeyPGP   2048
 

#define fLoopBack   16
 

#define fProtocol   0x40000000
 

#define FSabandoned   4
 

#define FScomplete   3
 

#define fSetDest   4
 

#define FSinit   0
 

#define FSreply   2
 

#define FSrequest   1
 

#define isEncrypted      (((x) & (fEncDES | fEncOTP | fEncOTP | fEncPGP)) != 0)
 

#define isSoundPacket      (((c) & (fFaceData | fKeyPGP | fHalfDuplex)) == 0)
 

#define LONG   long
 

#define LPC_FRAME_SIZE   160
 

#define LWL_MAX_SITES   5
 

#define NAT_LAUNCH
 

#define NOLONGLONG
 

#define PROTOCOL_RTP   2
 

#define PROTOCOL_SPEAKFREE   0
 

#define PROTOCOL_UNKNOWN   4
 

#define PROTOCOL_VAT   1
 

#define PROTOCOL_VATRTP_CRYPT   3
 

#define PUSH_TO_TALK
 

#define RTCP_APP_TEXT_CHAT   "SFtc"
 

#define RTP_SUPPORT
 

#define SAMPLE_RATE   8000
 

#define TINY_PACKETS   512
 

#define V   (void)
 


Typedef Documentation

typedef struct sbhead sbhead
 

typedef struct soundbuf soundbuf
 


Function Documentation

void adpcmdecomp struct soundbuf   sb
 

unsigned char alaw2ulaw unsigned char    aval
 

void copySDESitem char *    s,
char *    d
 

FILE* create_tempfile char *    temp_filename_pattern,
const int    uMask,
const int    unLink
 

FILE* create_tempfile_in_tempdir const char *    tag,
char **    genName,
const int    uMask,
const int    unLink
 

int isRTCPAPPpacket unsigned char *    p,
int    len,
char *    name,
unsigned char **    app_ptr
 

int isRTCPByepacket unsigned char *    p,
int    len
 

int isrtp unsigned char *    pkt,
int    len
 

int isValidRTCPpacket unsigned char *    p,
int    len
 

int isvat unsigned char *    pkt,
int    len
 

int makevatdone char *    v,
unsigned long    ssrc_i
 

int makeVATid char **    vp,
unsigned long    ssrc_i
 

void outHTML FILE *    fp,
char *    s
 

int parseSDES unsigned char *    packet,
struct rtcp_sdes_request   r
 

void rate_flow unsigned char *    ibuf,
unsigned char *    obuf,
int *    isamp,
int *    osamp
 

void rate_start int    inrate,
int    outrate
 

int rtp_make_app unsigned char *    p,
unsigned long    ssrc_i,
int    strict,
char *    type,
char *    content
 

int rtp_make_bye unsigned char *    p,
unsigned long    ssrc_i,
char *    raison,
int    strict
 

int rtp_make_sdes char **    pkt,
unsigned long    ssrc_i,
int    port,
int    strict
 

int rtpout soundbuf   sb,
unsigned long    ssrc_i,
unsigned long    timestamp_i,
unsigned short    seq_i,
int    spurt
 

void setaubufsize int    size
 

void sf_usleep unsigned    t
 

void sound_open_file_descriptors int *    audio_io,
int *    audio_ctl
 

void sounddest int    where
 

void soundflush void   
 

int soundgrab char *    buf,
int    len
 

int soundinit int    iomode
 

void soundplay int    len,
unsigned char *    buf
 

void soundplayvol int    value
 

void soundrecgain int    value
 

void soundterm void   
 

void string_DES_key char *    key,
unsigned char    des_key[8],
char    algorithm[16]
 

char* StrReplace char *    Str,
char *    OldStr,
char *    NewStr
 

int vatout soundbuf   sb,
unsigned long    ssrc_i,
unsigned long    timestamp_i,
int    spurt
 


Generated on Tue Feb 10 08:44:18 2004 for Speak-FreelyforUnix by doxygen1.2.18