source: network-demos/socket/buffer.h @ 7ba2ac5

4.11netdemos-4-5-branchnetwork-demos-4-10-branchnetwork-demos-4-6-branchnetwork-demos-4-7-branchnetwork-demos-4-8-branchnetwork-demos-4-9-branchrtems-4-5-branch
Last change on this file since 7ba2ac5 was 7ba2ac5, checked in by Joel Sherrill <joel.sherrill@…>, on Aug 21, 1998 at 1:26:06 PM

Added CVS Id Strings which were missing

  • Property mode set to 100644
File size: 940 bytes
Line 
1/*
2 * buffer.h : generate an executable to test the sockets.
3 * contains some useful declarations
4 *
5 *  $Id$
6 */
7
8#ifndef _BUFFER_H
9#define _BUFFER_H
10
11#include <stdio.h>
12
13
14#define SIZE_MAX_IP_HEADER      20     
15#define SIZE_MAX_TCP_HEADER     20     
16#define SIZE_MAX_UDP_HEADER     8       
17#define SIZE_MAX_BUFFER         5*1024 - SIZE_MAX_IP_HEADER - SIZE_MAX_TCP_HEADER
18
19/*
20 *The receive buffer size max shall be able to receive
21 *the payload and the headers (IP and TCP/UDP):
22 *- max IP header = 0xf ulong (ulong = 4bytes) 
23 *- max TCP header = 0xf ulong (ulong = 4bytes)
24 *- max UDP header = 8 bytes)
25 */
26#define SIZE_MAX_RCV_BUFFER             SIZE_MAX_BUFFER + (2*4*0xf)
27
28#define DEFAULT_PORT_SERVER 12345
29#define DEFAULT_PORT_CLIENT 54321
30#define DEF_MAXLOOP             -1
31
32
33unsigned char * BuildBuffer();
34void FreeBuffer(unsigned char * p_Buffer_puc);
35unsigned char * AllocBuffer();
36unsigned long CheckBuffer(unsigned char * p_Buffer_puc);
37
38#endif /* _BUFFER_H */
39
Note: See TracBrowser for help on using the repository browser.