Server Wait On Clients System - API Documentation  v1.6.4
Server Wait On Clients System.
validateconfig.c File Reference

To parse and validate the config file. More...

#include <ctype.h>
#include <errno.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <syslog.h>
#include <configmake.h>
#include <libmgec/mge-errno.h>
#include <libmgesysutils/mge-configfile.h>
#include <swoc/libswoccommon.h>
Include dependency graph for validateconfig.c:

Functions

static int validateconfigfileparams (const struct confsection *)
 
static int validatepollint (const struct confsection *)
 
static int validatessh (const struct confsection *ps)
 
static int validateserver (const struct confsection *)
 
static int validatesrvportno (const struct confsection *)
 
static int validatesshportno (const struct confsection *)
 
static int validatesshuser (const struct confsection *ps)
 
int swcom_validate_config (void)
 Parse and validate the config file. More...
 

Variables

int pollint
 Polling interval. More...
 
int ssh
 Use SSH false == 0, true == 1. More...
 
char server [_POSIX_HOST_NAME_MAX]
 Server name. More...
 
int srvportno
 Server port number. More...
 
int sshportno
 Local port to use if using SSH. More...
 
char sshuser [_POSIX_LOGIN_NAME_MAX]
 Server username for SSH. More...
 

Detailed Description

To parse and validate the config file.

Used for swocserver and swocclient not swocserverd.

Author
Copyright (C) 2017-2019, 2021, 2022 Mark Grant

Released under the GPLv3 only.
SPDX-License-Identifier: GPL-3.0-only

Version
v1.0.9 ==== 17/09/2022

Function Documentation

◆ swcom_validate_config()

int swcom_validate_config ( void  )

Parse and validate the config file.

On error mge_errno is set.

Returns
0 on success, < zero on failure.

◆ validateconfigfileparams()

static int validateconfigfileparams ( const struct confsection *  ps)
static

◆ validatepollint()

static int validatepollint ( const struct confsection *  ps)
static

◆ validateserver()

static int validateserver ( const struct confsection *  ps)
static

◆ validatesrvportno()

static int validatesrvportno ( const struct confsection *  ps)
static

◆ validatessh()

static int validatessh ( const struct confsection *  ps)
static

◆ validatesshportno()

static int validatesshportno ( const struct confsection *  ps)
static

◆ validatesshuser()

static int validatesshuser ( const struct confsection *  ps)
static

Variable Documentation

◆ pollint

int pollint

Polling interval.

◆ server

char server[_POSIX_HOST_NAME_MAX]

Server name.

◆ srvportno

int srvportno

Server port number.

◆ ssh

int ssh

Use SSH false == 0, true == 1.

◆ sshportno

int sshportno

Local port to use if using SSH.

◆ sshuser

char sshuser[_POSIX_LOGIN_NAME_MAX]

Server username for SSH.