source: network-demos/socket/buffer.h @ 0c9330e

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 0c9330e was f3b4c5a, checked in by Joel Sherrill <joel.sherrill@…>, on Aug 11, 1998 at 1:31:51 PM

New test from Emmanuel Raguet <raguet@…>.

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