#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Go to the source code of this file.
Defines | |
#define | __LIB3195_CONFIG_H_INCLUDED__ 1 |
#define | BEEP_DEFAULT_WINDOWSIZE 4096 |
Default TCP Windows size as defined in RFC 3081. | |
#define | BEEPFRAMEMAX BEEP_DEFAULT_WINDOWSIZE |
Maximum size of a single BEEP frame. | |
#define | SOCKETMAXINBUFSIZE BEEP_DEFAULT_WINDOWSIZE |
Maximum size of the socket layer receive buffer. | |
#define | STRINGBUF_ALLOC_INCREMENT 1024 |
Size of dynamic string buffer growth. | |
#define | STRINGBUF_TRIM_ALLOCSIZE 0 |
This is an important setting for the dynamic string object. | |
#define | DEBUGLEVEL 1 |
Enables debug aids if defined to 1, disables them otherwise. | |
#define | SECURITY_PEER_ERRREPORT_LEVEL 1 |
This is a security relevant setting. | |
#define | FEATURE_LISTENER 1 |
Should the listener features be provided? | |
#define | FEATURE_UDP 1 |
Should UDP (RFC 3164) features be provided? | |
#define | FEATURE_UNIX_DOMAIN_SOCKETS 1 |
Should Unix Domain Sockets feature be provided? | |
#define | FEATURE_COOKED 1 |
Should the COOKED profile be provided? If set to 1, COOKED will be implemented for the client and, if FEATURE_LISTNER is set, for the listener part, too. | |
#define | FEATURE_MSGAPI 1 |
Should the syslog message API be provided? Please note that some limited functionality of the API is provided in any case if FEATURE_LISTENER is turned on. | |
#define | TRUE 1 |
#define | FALSE 0 |
#define | SLEEP(x) sleep(x) |
#define | SR_SOCKET int |
#define | INVALID_SOCKET 0 |
#define | SNPRINTF snprintf |
This file includes all global defines as well as configuration settings. If you intend the lib to another environment, THIS is the place to add portability macros.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
* Neither the name of Adiscon GmbH or Rainer Gerhards nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
Default TCP Windows size as defined in RFC 3081. We may also define a value that suites us better... |
|
Should the syslog message API be provided? Please note that some limited functionality of the API is provided in any case if FEATURE_LISTENER is turned on. However, even in that case no parsing will take place if FEATURE_MSGAPI is not turned on. |
|
|
|
This is a security relevant setting. It specifies how channel 0 error messages are sent. We support full-fledged error messages which make diagnosing the error cause (hopefully) relatively easy. On the other hand, though, they may be abused to find something out about the inner workings or state of the server process. This setting allows to tune the level of information provided to the remote peer: 0 - totally unspecifc error message, all replies will be 550 "error occured". 1 - all error codes are reported as they are provided EXCEPT for the 451s (which reaveal internal errors). 451s are reported as 550 "error occured" 2 - all error codes (including 451s) are sent in full |
|
Maximum size of the socket layer receive buffer.
|
|
Size of dynamic string buffer growth. The dynamic string buffer object allocates memory in STRINGBUF_ALLOC_INCREMENT increments. This is to avoid too many malloc calls. If this number is too large, probably time and memory is wasted. However, if it is too low, too many allocations happen which in turn, too, results in performance degradation. It should not be set to below 128 bytes. The default value of 1024 is a good estimate and works well with most processor page sizes. You should only change this value after you have thought a while over the implications. |
|
This is an important setting for the dynamic string object. If set to 1, the dynamic string object trims the string to its maximum size once string processing is finished and the resulting string is returned to the caller. To do so, it needs to allocate a new buffer, copy the string over to that new buffer and then free the old one. If set to 0, the old (existing) buffer is simply returned. This will result in more memory being used (because the buffer most probably is a bit oversized), but it safes the extra processing time for the additional alloc, free and STRING COPY. We recommend using mode 0 for all environments, except when memory ressources are really constraint, in which case mode 1 should be selected. Do not use mode 1 unless you have a very good reason to do so! |