Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

sbuffers.h

Go to the documentation of this file.
00001 /*
00002  * Active Router Transport Protocol (ARTP) implementation
00003  * Copyright (c) 2004, Tomas Rebok
00004  * All rights reserved.
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the "BSD License" which is
00008  * distributed with the software in the file LICENSE.
00009  *
00010  * This program is distributed in the hope that it will be useful, but
00011  * WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the BSD
00013  * License for more details.
00014  */
00015 
00023 #ifndef ARTP_SBUFFERS_H
00024 #define ARTP_SBUFFERS_H   1
00025 
00026 
00027 #include <netinet/in.h>
00028 #include <sys/socket.h>
00029 #include "types.h"
00030 
00031 
00043 extern int 
00044 sbuffers_init(void);
00045 
00046 
00065 extern int 
00066 sbuffers_create(struct sockaddr *receiver);
00067 
00068 
00084 extern int 
00085 sbuffers_destroy(int id_buffer);
00086 
00087 
00104 extern int 
00105 sbuffers_get_size(int id_buffer, unsigned long int *buffer_size);
00106 
00107 
00144 extern int 
00145 sbuffers_add_packet(int id_buffer, struct sockaddr *receiver, SID_TYPE sid, 
00146         char *value, int size, SEQ_TYPE seq);
00147 
00148 
00174 extern int 
00175 sbuffers_get_packet(int id_buffer, char **value, int *size, 
00176         struct sockaddr **receiver);
00177 
00178 
00215 extern int 
00216 sbuffers_send_event(int id_buffer, char *bitstream, int size, double sent_time,
00217         double time_to_resend);
00218 
00219 
00235 extern int 
00236 sbuffers_resend_event(double time_to_resend);
00237 
00238 
00273 extern int 
00274 sbuffers_ack_event(int id_buffer, struct sockaddr *sender, SID_TYPE sid, 
00275         SEQ_TYPE seq, int *size, double *time);
00276 
00277 
00289 extern double 
00290 sbuffers_get_top_rsnd_time(void);
00291 
00292 
00319 extern int 
00320 sbuffers_get_rsnd_packet(char **value, int *size, struct sockaddr **receiver, 
00321         double *first_send_time);
00322 
00323 
00336 extern int 
00337 sbuffers_ignore_first_rsnd();
00338 
00339 
00340 #endif
00341 
00342 /* vim: set ts=4 : */

Generated on Fri May 21 07:50:24 2004 for Active Router Transport Protocol (ARTP) by doxygen1.2.15