Subversion Repositories Spectranet

[/] [trunk/] [tnfs/] [tnfsd/] [config.h] - Blame information for rev 570

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 291 winston
#ifndef _CONFIG_H
2
#define _CONFIG_H
3
/* The MIT License
4
 * Copyright (c) 2010 Dylan Smith
5
 * Permission is hereby granted, free of charge, to any person obtaining a copy
6
 * of this software and associated documentation files (the "Software"), to deal
7
 * in the Software without restriction, including without limitation the rights
8
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
 * copies of the Software, and to permit persons to whom the Software is
10
 * furnished to do so, subject to the following conditions:
11
 *
12
 * The above copyright notice and this permission notice shall be included in
13
 * all copies or substantial portions of the Software.
14
 *
15
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
 * THE SOFTWARE.
22
 *
23
 * tnfs daemon compile time configuration */
24
 
25
#define TNFSD_PORT      16384   /* UDP port to listen on */
26
#define MAXMSGSZ        532     /* maximum size of a TNFS message */
27
#define MAX_FD_PER_CONN 16      /* maximum open file descriptors per client */
28
#define MAX_DHND_PER_CONN 8     /* max open directories per client */
29 570 winston
#define MAX_CLIENTS     256     /* maximum number of UDP clients */
30
#define MAX_TCP_CONN    256     /* Maximum number of TCP clients */
31 291 winston
#define TNFS_HEADERSZ   4       /* minimum header size */
32 299 winston
#define MAX_TNFSPATH    256     /* maximum path length */
33 291 winston
#define MAX_FILEPATH    384     /* Maximum path + filename */
34
#define MAX_ROOT        128     /* maximum root dir length */
35
#define PROTOVERSION_LSB 0x00   /* Protocol version, LSB */
36
#define PROTOVERSION_MSB 0x01   /* Protocol version, MSB */
37
#define TIMEOUT_LSB     0xE8    /* Timeout LSB (1 sec) */
38
#define TIMEOUT_MSB     0x03    /* Timeout MSB (1 sec) */
39
#define MAX_FILENAME_LEN 256    /* longest filename supported */
40
#define MAX_IOSZ        512     /* maximum size of an IO operation */
41
 
42
 
43
#endif