Syslog client. More...
#include "core/net.h"
Go to the source code of this file.
Data Structures | |
struct | SyslogClientContext |
Syslog client context. More... | |
Macros | |
#define | SYSLOG_CLIENT_SUPPORT DISABLED |
#define | SYSLOG_CLIENT_BUFFER_SIZE 512 |
#define | SYSLOG_CLIENT_PRIVATE_CONTEXT |
Functions | |
error_t | syslogClientInit (SyslogClientContext *context) |
Syslog client initialization. More... | |
error_t | syslogClientBindToInterface (SyslogClientContext *context, NetInterface *interface) |
Bind the Syslog client to a particular network interface. More... | |
error_t | syslogClientConnect (SyslogClientContext *context, const IpAddr *serverIpAddr, uint16_t serverPort) |
Specify the address of the Syslog server. More... | |
error_t | syslogClientSendMessage (SyslogClientContext *context, uint_t facility, uint_t severity, const char_t *message) |
Send Syslog message. More... | |
error_t | syslogClientFormatMessage (SyslogClientContext *context, uint_t facility, uint_t severity, const char_t *format,...) |
Format Syslog message. More... | |
error_t | syslogClientClose (SyslogClientContext *context) |
Close the connection with the Syslog server. More... | |
void | syslogClientDeinit (SyslogClientContext *context) |
Release Syslog client context. More... | |
Detailed Description
Syslog client.
License
SPDX-License-Identifier: GPL-2.0-or-later
Copyright (C) 2010-2024 Oryx Embedded SARL. All rights reserved.
This file is part of CycloneTCP Open.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- Version
- 2.4.4
Definition in file syslog_client.h.
Macro Definition Documentation
◆ SYSLOG_CLIENT_BUFFER_SIZE
#define SYSLOG_CLIENT_BUFFER_SIZE 512 |
Definition at line 46 of file syslog_client.h.
◆ SYSLOG_CLIENT_PRIVATE_CONTEXT
#define SYSLOG_CLIENT_PRIVATE_CONTEXT |
Definition at line 53 of file syslog_client.h.
◆ SYSLOG_CLIENT_SUPPORT
#define SYSLOG_CLIENT_SUPPORT DISABLED |
Definition at line 39 of file syslog_client.h.
Enumeration Type Documentation
◆ SyslogFacility
enum SyslogFacility |
Syslog facility values.
Definition at line 66 of file syslog_client.h.
◆ SyslogSeverity
enum SyslogSeverity |
Syslog severity values.
Definition at line 99 of file syslog_client.h.
Function Documentation
◆ syslogClientBindToInterface()
error_t syslogClientBindToInterface | ( | SyslogClientContext * | context, |
NetInterface * | interface | ||
) |
Bind the Syslog client to a particular network interface.
- Parameters
-
[in] context Pointer to the Syslog client context [in] interface Network interface to be used
- Returns
- Error code
Definition at line 86 of file syslog_client.c.
◆ syslogClientClose()
error_t syslogClientClose | ( | SyslogClientContext * | context | ) |
Close the connection with the Syslog server.
- Parameters
-
[in] context Pointer to the Syslog client context
- Returns
- Error code
Definition at line 308 of file syslog_client.c.
◆ syslogClientConnect()
error_t syslogClientConnect | ( | SyslogClientContext * | context, |
const IpAddr * | serverIpAddr, | ||
uint16_t | serverPort | ||
) |
Specify the address of the Syslog server.
- Parameters
-
[in] context Pointer to the Syslog client context [in] serverIpAddr IP address of the Syslog server to connect to [in] serverPort UDP port number
- Returns
- Error code
Definition at line 109 of file syslog_client.c.
◆ syslogClientDeinit()
void syslogClientDeinit | ( | SyslogClientContext * | context | ) |
Release Syslog client context.
- Parameters
-
[in] context Pointer to the Syslog client context
Definition at line 331 of file syslog_client.c.
◆ syslogClientFormatMessage()
error_t syslogClientFormatMessage | ( | SyslogClientContext * | context, |
uint_t | facility, | ||
uint_t | severity, | ||
const char_t * | format, | ||
... | |||
) |
Format Syslog message.
- Parameters
-
[in] context Pointer to the Syslog client context [in] facility Facility value [in] severity Severity value [in] format NULL-terminated string that that contains a format string [in] ... Optional arguments
- Returns
- Error code
Definition at line 241 of file syslog_client.c.
◆ syslogClientInit()
error_t syslogClientInit | ( | SyslogClientContext * | context | ) |
Syslog client initialization.
- Parameters
-
[in] context Pointer to the Syslog client context
- Returns
- Error code
Definition at line 56 of file syslog_client.c.
◆ syslogClientSendMessage()
error_t syslogClientSendMessage | ( | SyslogClientContext * | context, |
uint_t | facility, | ||
uint_t | severity, | ||
const char_t * | message | ||
) |
Send Syslog message.
- Parameters
-
[in] context Pointer to the Syslog client context [in] facility Facility value [in] severity Severity value [in] message NULL-terminated string that holds the message
- Returns
- Error code
Definition at line 168 of file syslog_client.c.