Next Previous Contents

21. List of function not covered

ARRAY::grow_realloc()

        PRIVATE void ARRAY::grow_realloc(
                int newmax)
        

ARRAY::remove_last()

Remove the last entries of the array, after the "cut" first items

        PUBLIC void ARRAY::remove_last(
                int cut)

ARRAY::set()

Replace one item in the table. The table is grown as needed, potentially holding NULL element.

        PUBLIC void ARRAY::set(
                int pos,
                ARRAY_OBJ *pt)
        

ARRAY_KEY::ARRAY_KEY()

        PUBLIC ARRAY_KEY::ARRAY_KEY(
                const char *_key,
                ARRAY_OBJ *_obj,
                bool is_owner)
        

ARRAY_KEY:: ARRAY_KEY()

        PUBLIC ARRAY_KEY::~ARRAY_KEY(
                void)
        

ARRAY_KEYS::add()

        PUBLIC void ARRAY_KEYS::add(
                const char *key,
                ARRAY_OBJ *obj,
                bool owner)
        

ARRAY_KEYS::getitem()

        PUBLIC ARRAY_KEY *ARRAY_KEYS::getitem(
                int no) const
        
        

ARRAY_KEYS::getobj()

Return the key+object pair holding that key

        PUBLIC ARRAY_KEY *ARRAY_KEYS::getobj(
                const char *key) const
        
        

ARRAY_KEYS::getval()

Return the object associated with the key

        PUBLIC ARRAY_OBJ *ARRAY_KEYS::getval(
                const char *key) const
        
        

ARRAY_KEYS::sort()

Sort the array of SSTRING

        PUBLIC void ARRAY_KEYS::sort(
                void)
        

CONFDB::addk()

        PRIVATE void CONFDB::addk(
                const char *key,
                const char *val)
        

CONFDB::getvalk()

Find a record. using a single key Return NULL if not found.

        PUBLIC VIRTUAL const char *CONFDB::getvalk(
                const char *key,
                const char *defval)
        

CONFDB::initload()

        PUBLIC void CONFDB::initload(
                CONFIG_FILE&_fcfg,
                bool use_equal_sign,    // Is the config file of type "key val" or "key=val"
                const char comcar)
        

CONFDB::removeallk()

Remove all entry with a given key.

        PRIVATE void CONFDB::removeallk(
                const char *key)
        

CONFDB::replacek()

Replace one record in the configuration file

        PUBLIC void CONFDB::replacek(
                const char *key,
                const char *val)
        

CONFDB:: CONFDB()

        PUBLIC CONFDB::~CONFDB(
                void)
        

CONFIG_FILE::create()

Create the file empty with proper permission and ownership. Return -1 if any error

        PUBLIC int CONFIG_FILE::create(
                void) const
        
        

CONFIG_FILE::extract()

Replace the current config file with the one in the archive

        PUBLIC VIRTUAL int CONFIG_FILE::extract(
                void)
        

CONFIG_FILE::fclose()

        PUBLIC int CONFIG_FILE::fclose(
                FILE_CFG *fout)
        

CONFIG_FILE::forgetpath()

        PUBLIC void CONFIG_FILE::forgetpath(
                void)
        

CONFIG_FILE::getnext()

All config files are connected in a linked list. Return the next member

        PUBLIC CONFIG_FILE *CONFIG_FILE::getnext(
                void) const
        
        

CONFIG_FILE::getsubsys()

Return the name of the subsystem owning that config file

        PUBLIC const char *CONFIG_FILE::getsubsys(
                void) const
        
        

CONFIG_FILE::is_archived()

Return != 0 if the configuration file is archived (or may be archived)

        PUBLIC int CONFIG_FILE::is_archived(
                void) const
        
        

CONFIG_FILE::is_virtual()

Return != 0 if the configuration file is virtual

        PUBLIC int CONFIG_FILE::is_virtual(
                void) const
        
        

CONFIG_FILE::md5sum()

Compute the md5 checksum of the current configuration file

        PUBLIC VIRTUAL int CONFIG_FILE::md5sum(
                char *sum)
        

CONFIG_FILE::setkey()

Replace the original path name (the key to lookup the distribution dependant path) of a config file. This function is meant for contructor of derived class which assemble on the fly the path of a config file. See modules/mailconf/generate.cc.

        PUBLIC void CONFIG_FILE::setkey(
                const char *newkey)
        

CONFIG_FILE:: CONFIG_FILE()

        PUBLIC VIRTUAL CONFIG_FILE::~CONFIG_FILE(
                void)
        

CONFIG_FILES::getitem()

        PUBLIC CONFIG_FILE *CONFIG_FILES::getitem(
                int no) const
        

CONFIG_FILE_INTERNAL::CONFIG_FILE_INTERNAL()

        PUBLIC CONFIG_FILE_INTERNAL::CONFIG_FILE_INTERNAL(
                HELP_FILE&_helpfile,
                const char *_path,
                int _status,
                const char *_owner,
                const char *_group,
                int _perm,
                const char *_perm_str,
                const char *_subsys)
        

CONFIG_FILE_INTERNAL:: CONFIG_FILE_INTERNAL()

        PUBLIC CONFIG_FILE_INTERNAL::~CONFIG_FILE_INTERNAL(
                void)
        

CONFIG_FILE_LINUXCONF::CONFIG_FILE_LINUXCONF()

        PUBLIC CONFIG_FILE_LINUXCONF::CONFIG_FILE_LINUXCONF(
                const char *_path,
                const char *_subsys)
        

CONFIG_FILE_LINUXCONF::archive()

        PUBLIC int CONFIG_FILE_LINUXCONF::archive(
                SSTREAM&ss) const
        
        

CONFIG_FILE_LINUXCONF::extract()

        PUBLIC int CONFIG_FILE_LINUXCONF::extract(
                SSTREAM&ss)
        

CONFIG_FILE_SAMPLE::extract()

        int CONFIG_FILE_SAMPLE::extract(
                SSTREAM&ss)

CONTEXT_LOCK::CONTEXT_LOCK()

Provides exclusive access to an area in Linuxconf. The key is a string identifying an area in Linuxconf. Potentially a module name.

        PUBLIC CONTEXT_LOCK::CONTEXT_LOCK(
                const char *key)
        

CONTEXT_LOCK::init()

        PRIVATE void CONTEXT_LOCK::init(
                const char *_key1,
                const char *_key2,
                int _flags)
        

CONTEXT_LOCK::isok()

Return true if the lock was granted. If it returns false, the user has been notified about the lock. You just go away.

        PUBLIC bool CONTEXT_LOCK::isok(
                void) const
        

CONTEXT_LOCK:: CONTEXT_LOCK()

        PUBLIC CONTEXT_LOCK::~CONTEXT_LOCK(
                void)
        

CSSTRING::setfrom_c()

Record the value and the comment part of the CSSTRING

        PUBLIC void CSSTRING::setfrom_c(
                const SSTRING&val,
                const SSTRING&com)
        

DICTIONARY::DICTIONARY()

        PUBLIC DICTIONARY::DICTIONARY(
                void)
        

DICTIONARY::get_bool()

        PUBLIC bool DICTIONARY::get_bool(
                const char *var) const
        
        

DICTIONARY::get_int()

        PUBLIC int DICTIONARY::get_int(
                const char *var) const
        
        

DICTIONARY::get_obj()

        PUBLIC void *DICTIONARY::get_obj(
                const char *var) const
        
        

DICTIONARY::get_str()

        PUBLIC const char *DICTIONARY::get_str(
                const char *var) const
        
        

DICTIONARY::get_val()

Return the value (string) of the variable "no" of the dictionary. This is used by some functions which wants to iterate all variables Return NULL if no is out of range.

        PUBLIC const char *DICTIONARY::get_val(
                int no) const
        

DICTIONARY::get_var()

Return the name of the variable "no" of the dictionary. This is used by some functions which wants to iterate all variables Return NULL if no is out of range.

        PUBLIC const char *DICTIONARY::get_var(
                int no) const
        
        

DICTIONARY::getval_type()

        PRIVATE const char *DICTIONARY::getval_type(
                const char prefix,
                const char *var) const
        
        

DICTIONARY::set_bool()

Add/redefine a boolean value in the dictionary get_bool() must be used to retrieve it.

        PUBLIC void DICTIONARY::set_bool(
                const char *var,
                bool val)
        

DICTIONARY::set_int()

Add/redefine a numerical value in the dictionary get_int() must be used to retrieve it.

        PUBLIC void DICTIONARY::set_int(
                const char *var,
                int val)
        

DICTIONARY::set_obj()

Add/redefine a pointer to an object get_obj() must be used to retrieve it.

        PUBLIC void DICTIONARY::set_obj(
                const char *var,
                void *obj)
        

DICTIONARY::set_str()

Add/redefine a string value in the dictionary get_str() must be used to retrieve it.

        PUBLIC void DICTIONARY::set_str(
                const char *var,
                const char *val)
        

DICTIONARY::set_type()

        PRIVATE void DICTIONARY::set_type(
                const char prefix,
                const char *var,
                const char *val)
        

FILE_CFG::FILE_CFG()

        PUBLIC FILE_CFG::FILE_CFG(
                FILE *_f,
                const CONFIG_FILE *_cf)
        

HELP_FILE::HELP_FILE()

Record the spec of a config file that is maintain (or used) by linuxconf

        PUBLIC HELP_FILE::HELP_FILE(
                const char *_subdir,
                const char *_fname)
        

HELP_FILE::getpath()

Return the path of the configuration file

        PUBLIC const char *HELP_FILE::getpath(
                void)
        

HELP_FILE::getpaths()

Resolve the path of a help file by picking the first available langage: The one selected by the user or english if the first is available. We know which one by looking for the .help file. But the caller is only interested in the base path

        PRIVATE void HELP_FILE::getpaths(
                char abspath[PATH_MAX],
                char relpath[PATH_MAX])
        

HELP_FILE::getrpath()

Provide the relative path of a help file (relative to /usr/lib/linuxconf)

        PUBLIC void HELP_FILE::getrpath(
                char *rpath)
        

HELP_FILE::is_nil()

Is this is the help_nil object

        PUBLIC bool HELP_FILE::is_nil(
                void) const
        
        

IPMAP::IPMAP()

        PUBLIC IPMAP::IPMAP(
                const char *line)
        

IPMAP::getcur()

Obtain the current available IP in the range. Use this function to walk a range with the next() function.

        PUBLIC const char *IPMAP::getcur(
                void)
        

IPMAP::next()

Go to the next available IP number of the range Return -1 if the range limit is reached.

        PUBLIC int IPMAP::next(
                void)
        

IPMAP::reset()

Reset the available IP number to the minimum of the range

        PUBLIC void IPMAP::reset(
                void)
        

IPMAP::setup()

Parse the IP range and prepare for the search of an available IP. Return -1 if the IP range is invalid (not x.y.z.w1-w2)

        PUBLIC int IPMAP::setup(
                void)
        

IPMAP::setuse()

Record the fact that the IP "adr" is in use. This function assume that it will be called with adr always increasing.

        PUBLIC void IPMAP::setuse(
                const IP_ADDR *adr)

IP_ADDR::IP_ADDR()

        PUBLIC IP_ADDR::IP_ADDR(
                const IP_ADDR&adr)
        

IP_ADDR::cmp()

        PUBLIC int IP_ADDR::cmp(
                const char *str)
        

IP_ADDR::copyword()

Record an IP address (potentially incomplete, from a string Return the remaining of the string.

        PUBLIC char *IP_ADDR::copyword(
                const char *pt)
        

IP_ADDR::increm()

Augment the IP number by one. No reformat is done since this function is called often

        PUBLIC void IP_ADDR::increm(
                void)
        

IP_ADDR::is_valid()

Return != 0 if this is a valid IP number

        PUBLIC int IP_ADDR::is_valid(
                void)
        

IP_ADDR::merge()

Merge one IP number end over another.

        PUBLIC void IP_ADDR::merge(
                IP_ADDR&partial)
        

IP_ADDR::reformat()

Reformat the string representation from the four numbers

        PUBLIC void IP_ADDR::reformat(
                void)
        

IP_ADDR::reverse()

Turn the IP number upside-down

        PUBLIC void IP_ADDR::reverse(
                void)
        

IP_ADDR::setfrom()

Record an IP address (potentially incomplete, from a string Return the remaining of the string.

        PUBLIC void IP_ADDR::setfrom(
                const char *pt)
        

IP_ADDR::setrev()

Compute the domain for reverse mapping IN-ADDR.ARPA Guess the type of network from the amount ot -1's in the address.

        PUBLIC void IP_ADDR::setrev(
                char *str)
        

IP_ADDR::shift()

Shift the IP numbers to the left over the -1's (0.0.1.2 -> 1.2.0.0)

        PUBLIC void IP_ADDR::shift(
                void)
        

IP_ADDR::shift_right()

Shift the IP numbers to the right over the -1's (1.2.0.0 -> 0.0.1.2)

        PUBLIC void IP_ADDR::shift_right(
                void)
        

IP_ADDRS::getitem()

        PUBLIC IP_ADDR *IP_ADDRS::getitem(
                int no) const
        
        

IP_ADDRS::sort()

        PUBLIC void IP_ADDRS::sort(
                void)
        

LIBMODULE::LIBMODULE()

        LIBMODULE::LIBMODULE(
                char *name)
        

LIBMODULE::loaded()

        bool LIBMODULE::loaded(
                void)
        

LIBMODULE:: LIBMODULE()

        LIBMODULE::~LIBMODULE(
                void)
        

LINUXCONF_CONTEXT::LINUXCONF_CONTEXT()

        PUBLIC LINUXCONF_CONTEXT::LINUXCONF_CONTEXT(
                const char *_path)
        

LINUXCONF_CONTEXT::init()

        PRIVATE void LINUXCONF_CONTEXT::init(
                void)
        

LINUXCONF_CONTEXT::set()

        PUBLIC void LINUXCONF_CONTEXT::set(
                LINUXCONF_CONTEXT&cur)
        

LINUXCONF_CONTEXT::settitle()

        PUBLIC void LINUXCONF_CONTEXT::settitle(
                const char *title)
        

LINUXCONF_MODULE::getname()

        PUBLIC const char *LINUXCONF_MODULE::getname(
                void)
        

LINUXCONF_MODULE::message()

A module may participate in a broadcast system where one send a message and modules may react. The amount of interaction is limited though. This can be used to synchronise stuff.

        PUBLIC VIRTUAL int LINUXCONF_MODULE::message(
                const char *,   // message
                int,    // argc
                const char *[]) // argv[]
        

LINUXCONF_MODULE::setname()

        PUBLIC void LINUXCONF_MODULE::setname(
                const char *_name)
        

LINUXCONF_MODULE::usage()

Add command line usage information to the SSTRING table

        PUBLIC VIRTUAL void LINUXCONF_MODULE::usage(
                SSTRINGS&)
        

LINUXCONF_MODULES::getitem()

        PUBLIC LINUXCONF_MODULE *LINUXCONF_MODULES::getitem(
                int no)
        

LINUXCONF_SUBSYS::LINUXCONF_SUBSYS()

        PUBLIC LINUXCONF_SUBSYS::LINUXCONF_SUBSYS(
                const char *key,
                TRANS_NOTLOAD *_title)  // Title shown in the subsys dialogs
        

LINUXCONF_SUBSYS::gettitle()

        PUBLIC const char *LINUXCONF_SUBSYS::gettitle(
                void)
        

LINUXCONF_SUBSYS::init()

        PRIVATE void LINUXCONF_SUBSYS::init(
                const char *key)
        

LINUXCONF_SUBSYS:: LINUXCONF_SUBSYS()

        PUBLIC LINUXCONF_SUBSYS::~LINUXCONF_SUBSYS(
                void)
        

LINUXCONF_SUBSYSS::getitem()

        PUBLIC LINUXCONF_SUBSYS *LINUXCONF_SUBSYSS::getitem(
                int no) const
        
        

MODULE_API::MODULE_API()

        PUBLIC MODULE_API::MODULE_API(
                void *(*_fctget)(),
                void(*_fctrelease)(void *))
        

MODULE_APIREF::MODULE_APIREF()

        PUBLIC MODULE_APIREF::MODULE_APIREF(
                const char *_apiname,
                int _version)
        

MODULE_APIREF::add()

        PUBLIC void MODULE_APIREF::add(
                void *(*_fctget)(),
                void(*_fctrelease)(void *))
        

MODULE_APIREF:: MODULE_APIREF()

        PUBLIC MODULE_APIREF::~MODULE_APIREF(
                void)
        

MODULE_APIREFS::getitem()

        PUBLIC MODULE_APIREF *MODULE_APIREFS::getitem(
                int no) const
        
        

MODULE_APIS::getitem()

        PUBLIC MODULE_API *MODULE_APIS::getitem(
                int no) const
        
        

MODULE_INFO::MODULE_INFO()

        PUBLIC MODULE_INFO::MODULE_INFO(
                bool _active,
                const char *name)
        

MODULE_INFO::checkdep()

Load the libmodules required by this module

        PUBLIC void MODULE_INFO::checkdep(
                void)
        

MODULE_INFO::locate()

Locate a module based on the version of linuxconf Return -1 if the module can't be found. realpath will contain the path linuxconf was looking for. Return the subrevision number.

        PUBLIC int MODULE_INFO::locate(
                char realpath[PATH_MAX])
        

MODULE_INFO::write()

        PUBLIC int MODULE_INFO::write(
                void)
        

MODULE_INFOS::MODULE_INFOS()

        PUBLIC MODULE_INFOS::MODULE_INFOS(
                void)
        

MODULE_INFOS::getitem()

        PUBLIC MODULE_INFO *MODULE_INFOS::getitem(
                int no)
        

MODULE_INFOS::read_all()

Add information about all available module in /usr/lib/linuxconf/modules

        PUBLIC void MODULE_INFOS::read_all(
                void)
        

MODULE_INFOS::setone()

Add one module to the list. If the module is already in the list, let it there without affecting its enabled flag.

        PUBLIC void MODULE_INFOS::setone(
                const char *path,
                bool force,
                bool enabled)
        

MODULE_INFOS::unsetone()

Remove a module from the list.

        PUBLIC void MODULE_INFOS::unsetone(
                const char *path)
        

MODULE_INFOS::write()

        PUBLIC int MODULE_INFOS::write(
                void)
        

ONECONF::ONECONF()

        PUBLIC ONECONF::ONECONF(
                const char *_name)
        

ONECONF::getfamily()

Get the archiving family for a sub-system

        PUBLIC const char *ONECONF::getfamily(
                const char *subsys)
        

ONECONF::remove()

        PUBLIC void ONECONF::remove(
                void)
        

ONECONF::setkey()

        PUBLIC void ONECONF::setkey(
                char *key)
        

ONECONF::write()

Save the configuration in conf.linuxconf

        PUBLIC void ONECONF::write(
                void)
        

POPEN::POPEN()

        PUBLIC POPEN::POPEN(
                const char *command,
                int uid,        // Effective and real UID of the new process
                bool keepenv,
                bool keepcwd)
        

POPEN::checksignal()

Check if some signal was received about child death

        PRIVATE void POPEN::checksignal(
                void)
        

POPEN::close()

Closing the PIPE to standard input of the command. Expect the command to terminate soon (20 seconds timeout). Return the exit code

        PUBLIC int POPEN::close(
                void)
        

POPEN::forget()

Forget about the child process. It won't be killed by the destructor of POPEN

        PUBLIC void POPEN::forget(
                void)
        

POPEN::getstatus()

Return the status code of the ending process

        PUBLIC int POPEN::getstatus(
                void)
        

POPEN::init()

        PRIVATE void POPEN::init(
                const char *command,
                int uid,
                bool keepenv,   // Do not create a clean environment
                bool keepcwd)   // Do not chdir to /
        

POPEN::initarg()

        PRIVATE void POPEN::initarg(
                const char *command,
                const char *args,
                int uid)
        

POPEN::isok()

Return != 0 if the pipe is corretly opened

        PUBLIC bool POPEN::isok(
                void)
        

POPEN::kill()

        PUBLIC void POPEN::kill(
                void)
        

POPEN::wait()

Wait for anything to be available from the child process Return -1 if any error. Return 0 if the timeout has elapsed. Return 1 if there is some data to read

        PUBLIC int POPEN::wait(
                int timeout)
        

POPEN::waitend()

Wait until the process is really dead and recover its end status

        PRIVATE void POPEN::waitend(
                void)
        

POPEN::waitone()

        PRIVATE void POPEN::waitone(
                void)
        

POPEN:: POPEN()

        PUBLIC POPEN::~POPEN(
                void)
        

POPENFD::POPENFD()

        PROTECTED POPENFD::POPENFD(
                void)
        

POPENFD::flush()

Flush the output buffer

        PUBLIC void POPENFD::flush(
                void)
        

POPENFD::getfout()

get the FILE handle used to send strings to the process. The application does not have to close it.

        PUBLIC FILE *POPENFD::getfout(
                void)
        

POPENFD::grabhandles()

Grab the PIPE handles used by this object to prevent it from closing them. Return the number of handle placed in tb[]. This trickery is needed for startup scripts which goes in background but still try to "talk" on stdout/stderr. This is brain dead. If we close the PIPE too soon, we end up with a dead process (it receives SIGPIPE). The caller of this object grabs the PIPE handles and close it after some reasonnable delay.

        PUBLIC void POPENFD::grabhandles(
                int &in,
                int &out,
                int &err)
        

POPENFD::iseof()

        PUBLIC bool POPENFD::iseof(
                void)
        

POPENFD::isok()

Return != 0 if the pipe is corretly opened

        PUBLIC VIRTUAL bool POPENFD::isok(
                void)
        

POPENFD::loadout()

Preset the out buffer with some pre-read lines

        PUBLIC void POPENFD::loadout(
                const char *lines)
        

POPENFD::process()

        PUBLIC int POPENFD::process(
                int ret_select,
                fd_set&in,
                int otherfd,
                bool&ctlmsg)
        

POPENFD::readerr()

Read one line of stderr if available (won't block). Return -1 if no more to read.

        PUBLIC int POPENFD::readerr(
                char *line,
                int size)
        

POPENFD::readif()

        PRIVATE void POPENFD::readif(
                fd_set *in,
                int fd,
                SSTRING&buf,
                bool&ctlmsg)
        

POPENFD::readline()

Read one complete line or up to size byte in "line". If there is no complete line, nothing is read

        PRIVATE int POPENFD::readline(
                char *line,
                int size,
                SSTRING&buf)
        

POPENFD::readout()

Read one line of stdout if available (won't block). Return -1 if no more to read.

        PUBLIC int POPENFD::readout(
                char *line,
                int size)
        

POPENFD::readoutraw()

Read some bytes of stdout if available (won't block). Return the number of bytes written in buf Return -1 if no more to read.

        PUBLIC int POPENFD::readoutraw(
                char *data,
                int size)
        

POPENFD::send()

Send a string to the standard input of the process

        PUBLIC void POPENFD::send(
                const char *msg)
        

POPENFD::sendf()

Send a formatted string to the standard input of the process

        PUBLIC void POPENFD::sendf(
                const char *ctl,
                ...)
        

POPENFD::seteof()

        PUBLIC void POPENFD::seteof(
                void)
        

POPENFD::setfds()

        PROTECTED void POPENFD::setfds(
                int fdin,
                int fdout,
                int fderr,
                int fdctl)
        

POPENFD::setup()

        PUBLIC int POPENFD::setup(
                fd_set&in,
                int maxfd,
                int otherfd)
        

POPENFD::wait()

Wait for anything to be available from the child process Return -1 if any error. Return 0 if the timeout has elapsed. Return 1 if there is some data to read

        PUBLIC int POPENFD::wait(
                int timeout)
        

POPENFD:: POPENFD()

        PUBLIC VIRTUAL POPENFD::~POPENFD(
                void)
        

POPENUSER::POPENUSER()

Execute a command for a user. Unlike POPEN which make sure tne environment is secure, POPENUSER is really trusting the user. This is never called by Linuxconf

        PUBLIC POPENUSER::POPENUSER(
                const char *cmd)
        

POPENWAIT::POPENWAIT()

Object used to wait for several POPEN at once

        PUBLIC POPENWAIT::POPENWAIT(
                POPENFD&_po,
                int _timeout)
        

POPENWAIT::getretcode()

Return the return code of the wait function

        PUBLIC int POPENWAIT::getretcode(
                void)
        

POPENWAITS::getitem()

        PUBLIC POPENWAIT *POPENWAITS::getitem(
                int no) const
        
        

POPENWAITS::hasdata()

Return true if at least one POPENWAIT object has some data waiting

        PUBLIC bool POPENWAITS::hasdata(
                void)

POPENWAITS::wait()

        PUBLIC int POPENWAITS::wait(
                void)
        

SSTREAM::printf()

        PUBLIC int SSTREAM::printf(
                const char *ctl,
                ...)
        

SSTREAM::putch()

        PUBLIC void SSTREAM::putch(
                char c)
        

SSTREAM:: SSTREAM()

        PUBLIC VIRTUAL SSTREAM::~SSTREAM(
                void)
        

SSTREAM_BUF::SSTREAM_BUF()

        PUBLIC SSTREAM_BUF::SSTREAM_BUF(
                void)
        

SSTREAM_BUF::getbuf()

Return the buffer which contain all the output of the various puts.

        PUBLIC const char *SSTREAM_BUF::getbuf(
                void) const
        
        

SSTREAM_BUF::getoffset()

Return the current position in the buffer

        PUBLIC long SSTREAM_BUF::getoffset(
                void)
        

SSTREAM_BUF::gets()

        PUBLIC char *SSTREAM_BUF::gets(
                char *s,
                int maxs)
        

SSTREAM_BUF::puts()

        PUBLIC void SSTREAM_BUF::puts(
                const char *s)
        

SSTREAM_BUF:: SSTREAM_BUF()

        PUBLIC SSTREAM_BUF::~SSTREAM_BUF(
                void)
        

SSTREAM_FILE::SSTREAM_FILE()

The SSTREAM_FILE reads of writes to a FILE handle

        PUBLIC SSTREAM_FILE::SSTREAM_FILE(
                FILE *_f)
        

SSTREAM_FILE::getoffset()

        PUBLIC long SSTREAM_FILE::getoffset(
                void)
        

SSTREAM_FILE::gets()

        PUBLIC char *SSTREAM_FILE::gets(
                char *s,
                int maxs)
        

SSTREAM_FILE::puts()

        PUBLIC void SSTREAM_FILE::puts(
                const char *s)
        

SSTREAM_FILE_CFG::SSTREAM_FILE_CFG()

The SSTREAM_FILE_CFG reads of writes to a FILE_CFG handle

        PUBLIC SSTREAM_FILE_CFG::SSTREAM_FILE_CFG(
                FILE_CFG *_f)
        

SSTREAM_FILE_CFG::getoffset()

        PUBLIC long SSTREAM_FILE_CFG::getoffset(
                void)
        

SSTREAM_FILE_CFG::gets()

        PUBLIC char *SSTREAM_FILE_CFG::gets(
                char *s,
                int maxs)
        

SSTREAM_FILE_CFG::puts()

        PUBLIC void SSTREAM_FILE_CFG::puts(
                const char *s)
        

SSTREAM_NUL::getoffset()

        PUBLIC long SSTREAM_NUL::getoffset(
                void)

SSTREAM_NUL::gets()

        PUBLIC char *SSTREAM_NUL::gets(
                char *,
                int)
        

SSTREAM_NUL::puts()

        PUBLIC void SSTREAM_NUL::puts(
                const char *)
        

SSTREAM_POPEN::SSTREAM_POPEN()

The SSTREAM_POPEN reads or writes to a POPEN process

        PUBLIC SSTREAM_POPEN::SSTREAM_POPEN(
                POPENFD&_pop)
        

SSTREAM_POPEN::getoffset()

        PUBLIC long SSTREAM_POPEN::getoffset(
                void)
        

SSTREAM_POPEN::gets()

        PUBLIC char *SSTREAM_POPEN::gets(
                char *s,
                int maxsiz)
        

SSTREAM_POPEN::puts()

        PUBLIC void SSTREAM_POPEN::puts(
                const char *s)
        

SSTREAM_POPEN:: SSTREAM_POPEN()

        PUBLIC SSTREAM_POPEN::~SSTREAM_POPEN(
                void)
        

SSTRINGS::append()

        PUBLIC void SSTRINGS::append(
                const SSTRINGS&tb)

SSTRINGS::ilookup()

        PUBLIC int SSTRINGS::ilookup(
                const SSTRING *str) const
        
        

SSTRING_KEY::SSTRING_KEY()

        PUBLIC SSTRING_KEY::SSTRING_KEY(
                const char *_key,
                const char *_val)
        

SSTRING_KEY::getobj()

        PUBLIC SSTRING *SSTRING_KEY::getobj(
                void)
        

SSTRING_KEY::getobjval()

        PUBLIC const char *SSTRING_KEY::getobjval(
                void)
        

SSTRING_KEYS::add()

        PUBLIC void SSTRING_KEYS::add(
                const char *key,
                const char *val)
        

SSTRING_KEYS::getitem()

        PUBLIC SSTRING_KEY *SSTRING_KEYS::getitem(
                int no) const
        
        

SSTRING_KEYS::getobj()

Return the STRING_KEY or NULL associated with the key

        PUBLIC SSTRING_KEY *SSTRING_KEYS::getobj(
                const char *key) const
        
        

SSTRING_KEYS::getval()

Return the string or NULL associated with the key

        PUBLIC const char *SSTRING_KEYS::getval(
                const char *key) const
        

TIMESTR::TIMESTR()

        PUBLIC TIMESTR::TIMESTR(
                void)

TIMESTR::formatstr()

        PRIVATE void TIMESTR::formatstr(
                void)
        

TIMESTR::setfrom()

        PUBLIC void TIMESTR::setfrom(
                long _seconds)
        

VIEWITEM::VIEWITEM()

        PUBLIC VIEWITEM::VIEWITEM(
                const char *_line,
                int _type)
        

VIEWITEMS::VIEWITEMS()

        PUBLIC VIEWITEMS::VIEWITEMS(
                void)
        

VIEWITEMS::add()

        PUBLIC void VIEWITEMS::add(
                VIEWITEM *pt)
        

VIEWITEMS::comment()

        PUBLIC bool VIEWITEMS::comment(
                const char *var)

VIEWITEMS::getitem()

        PUBLIC VIEWITEM *VIEWITEMS::getitem(
                int no) const
        
        

VIEWITEMS::getnb()

        PUBLIC int VIEWITEMS::getnb(
                int type) const
        
        

VIEWITEMS::insert()

        PUBLIC void VIEWITEMS::insert(
                int pos,
                VIEWITEM *pt,
                int type)
        

VIEWITEMS::locate()

Locate all VIEWITEMs starting with the keyword key

        PUBLIC int VIEWITEMS::locate(
                const char *key1,
                const char *key2,
                VIEWITEMS&items)
        

VIEWITEMS::locate_gen()

Locate all VIEWITEMs starting with the keyword key (full or partial match)

        PRIVATE int VIEWITEMS::locate_gen(
                const char *key,
                VIEWITEMS&items,
                bool fullmatch) // key match completly the first word on the
                // line or not
        

VIEWITEMS::locate_prefix()

Locate all VIEWITEMs starting with the keyword key (partial match)

        PUBLIC int VIEWITEMS::locate_prefix(
                const char *key,
                VIEWITEMS&items)
        

VIEWITEMS::locateassign()

Locate a VIEWITEM which is an assignment of the variable var (var=value)

        PUBLIC VIEWITEM *VIEWITEMS::locateassign(
                const char *var)
        

VIEWITEMS::locatebval()

Locate a boolean (yes/no) value Return 0 if false, 1 if true. Return 0 if the variable is not there.

        PUBLIC int VIEWITEMS::locatebval(
                const char *var)
        

VIEWITEMS::locatecommented()

Locate a VIEWITEM which is an assignment of the variable var (var=value) and is commented

        PUBLIC VIEWITEM *VIEWITEMS::locatecommented(
                const char *var)
        

VIEWITEMS::locatehval()

Locate an hexadecimal value

        PUBLIC int VIEWITEMS::locatehval(
                const char *var)
        

VIEWITEMS::locatenval()

Locate a numeric value

        PUBLIC int VIEWITEMS::locatenval(
                const char *var)
        

VIEWITEMS::locateval()

Locate the value of a variable. Return NULL if the variable is not defined The quote surrounding the value are removed.

        PUBLIC const char *VIEWITEMS::locateval(
                const char *var,
                char tmp[1000]) // Work buffer, ret might point to it
        

VIEWITEMS::lookup()

        PUBLIC int VIEWITEMS::lookup(
                VIEWITEM *o,
                bool real) const
        
        

VIEWITEMS::moveto()

        PUBLIC void VIEWITEMS::moveto(
                VIEWITEM *o,
                int newpos)
        

VIEWITEMS::read()

Read a configuration file in memory

        PUBLIC int VIEWITEMS::read(
                CONFIG_FILE&fconf)
        

VIEWITEMS::realpos()

        PUBLIC int VIEWITEMS::realpos(
                int no,
                int type) const
        
        

VIEWITEMS::remove_del()

        PUBLIC int VIEWITEMS::remove_del(
                int no,
                int type)
        

VIEWITEMS::setcomcar()

Define the comment character used in the config file. This is the # sign by default

        PUBLIC void VIEWITEMS::setcomcar(
                char com)
        

VIEWITEMS::uncomment()

        PUBLIC bool VIEWITEMS::uncomment(
                const char *var)
        

VIEWITEMS::update()

Update or add an assignement of the form var="val"

        PUBLIC void VIEWITEMS::update(
                const char *var,
                const SSTRING&val)
        

VIEWITEMS::updatebval()

Update or add an assignement of the form var="yes" or var="no"

        PUBLIC void VIEWITEMS::updatebval(
                const char *var,
                bool val)
        

VIEWITEMS::updatehval()

Update or add an assignement of the form var="val"

        PUBLIC void VIEWITEMS::updatehval(
                const char *var,
                int val)
        

VIEWITEMS::virtpos()

Convert a "real" position into a virtual one. A real position is simply the index of a VIEWITEM in a VIEWITEMS. A virtual position is the index of the VIEWITEM if we are only counting the items of the same type.

        PUBLIC int VIEWITEMS::virtpos(
                int no) const
        
        

VIEWITEMS::write()

Write back a configuration file (overwrite). Return -1 if any error

        PUBLIC int VIEWITEMS::write(
                CONFIG_FILE&fconf,
                PRIVILEGE *priv)
        

VIEWITEMS_PARSER::VIEWITEMS_PARSER()

        PUBLIC VIEWITEMS_PARSER::VIEWITEMS_PARSER(
                void)
        

VIEWITEMS_PARSER::addline()

        PUBLIC VIRTUAL void VIEWITEMS_PARSER::addline(
                const char *line)
        

VIEWITEMS_PARSER::getline()

Iterator returning each line of the file. reset is used to position to the start of the file. Return NULL at the end.

        PUBLIC VIRTUAL const char *VIEWITEMS_PARSER::getline(
                bool reset,
                const char *&comment)
        

VIEWITEMS_PARSER::init()

        PUBLIC VIRTUAL void VIEWITEMS_PARSER::init(
                VIEWITEMS&_vi)
        

VIEWITEMS_PARSER::is_comment()

Return true if this is a comment

        PUBLIC VIRTUAL bool VIEWITEMS_PARSER::is_comment(
                const char *line)
        

VIEWITEMS_PARSER::skip_comment()

        PUBLIC VIRTUAL const char *VIEWITEMS_PARSER::skip_comment(
                const char *line)
        

VIRTDB::VIRTDB()

        PUBLIC VIRTDB::VIRTDB(
                const char *_name)
        

VIRTDB:: VIRTDB()

        PUBLIC VIRTUAL VIRTDB::~VIRTDB(
                void)
        

arraykey_required()

To force the link

        void arraykey_required(
                void)
        

boot_showlog()

        void boot_showlog(
                class CONFIG_FILE&,
                char const **,
                char const *,
                char const *,
                class HELP_FILE&)
        

button_text2png()

        void button_text2png(
                const char *,
                FILE *)
        

comment_write()

Write back a bunch of comment lines

        void comment_write(
                const SSTRING&str,
                FILE *fout)
        

configf_archive()

        int configf_archive(
                const SSTRINGS&tb,  // Sub-system or files to archive
                // (A file starts with a /)
                const char *command,    // Archiving command (just the name)
                // normally cfgarchive
                const char *arg,        // First argument of the command
                // normally --arch
                SSTREAM&ssout,
                bool verbose)
        

configf_booterase()

Erase some config file at boot time.

        void configf_booterase(
                void)
        

configf_extract()

Extract all the file of the current configuration

        int configf_extract(
                const SSTRINGS&tb,  // Sub-systems or files (starts with a /)
                const char *command,    // Archiving command (just the name)
                // normally cfgarchive
                const char *arg)        // First argument of the command
                // normally --extr
        

configf_forgetpath()

Forget the realpath of every config file. This function is called after a context switch to make sure the realpath of the config files will be computed with the new basepath. See CONFIG_FILE::fixpath().

        void configf_forgetpath(
                void)
        

configf_getsubsyslist()

Obtain the list of all subsystems associated with configuration files The list is added to the tb object. Return the number of subsystem added to tb.

        int configf_getsubsyslist(
                SSTRINGS&tb)
        

configf_getsubsysmembers()

Get the list of configuration files member of a sub-system

        int configf_getsubsysmembers(
                const char *subsys,
                SSTRINGS&tb)
        

configf_list()

Output on stdout the list of config file known to linuxconf with flags, sub-system and original path if the admin changed it.

        void configf_list(
                void)
        

configf_locate()

Locate a CONFIG_FILE based on its real (fixed) path Return NULL if it does not exist

        CONFIG_FILE *configf_locate(
                const char *path)
        

configf_lookup()

        EXPORT const char *configf_lookup(
                const char *prefix,
                const char *key)
        

configf_lookuppath()

Find the corresponding path for the current distribution. Return the key itself if the lookup has nothing for this key.

        EXPORT const char *configf_lookuppath(
                const char *key)
        

configf_mapowner()

        EXPORT void configf_mapowner(
                const char *generic_user,
                const char *generic_group,
                const char *generic_perm,
                char user[100],
                char group[100],
                char perm[100])
        

configf_md5sum()

Do the md5 check sum all the file of the current configuration

        int configf_md5sum(
                const SSTRINGS&tb,
                SSTREAM&ss)
        

configf_readlookup()

Read the various *.paths files. These let us translate standard paths to correct path for a given distribution. This function must be called after the distribution specific module has been loaded. It is called once.

        void configf_readlookup(
                void)
        

configf_required()

To force the link of some stuff only used by modules

        void configf_required(
                void)
        

configf_sendexist()

Send the heading line telling that the file exist and the rest is following. This function must be used by all variation of the CONFIG_FILE::archive() function

        void configf_sendexist(
                SSTREAM&ss,
                bool do_exist)
        

configf_show()

List all config file managed by this system

        void configf_show(
                void)
        

confver_edit()

        void confver_edit(
                void)
        

confver_getcur()

Get the current version name of all the configuration files

        const char *confver_getcur(
                void)
        

confver_getfamily()

Return the archiving family associated with a subsystem. Return NULL if none (no archiving needed for this system).

        const char *confver_getfamily(
                const char *subsys)
        

confver_getmode()

Return the archiving mode. True means that archiving is done each time linuxconf modify the file (before modifying it in fact).

        bool confver_getmode(
                void)
        

confver_selectprofile()

Switch to a new profile, archive the current one Return -1 if any error

        int confver_selectprofile(
                const char *newver_name)
        

confver_selnewver()

        void confver_selnewver(
                void)
        

confver_setcur()

Record the new configuration name of all the configuration files

        void confver_setcur(
                const char *newcur)
        

context_create()

Create an empty file in the current admin tree

        int context_create(
                const char *path,
                const char *user,
                const char *group,
                int perm)
        

context_fexist()

Check if a file or directory exist in the current admin tree

        bool context_fexist(
                const char *path)

context_isroot()

Return true if we are operating in the main admin tree

        bool context_isroot(
                void)
        

context_lock_required()

        void context_lock_required(
                void)
        

context_mkdir()

Create a directory in the current admin tree

        int context_mkdir(
                const char *dir,
                const char *user,
                const char *group,
                int perm)
        

context_mkdirp()

Create a directory in the current admin tree

        int context_mkdirp(
                const char *dir,
                const char *user,
                const char *group,
                int perm)
        

context_setabspath()

        void context_setabspath(
                const char *path,
                char abspath[])
        

daemon_findpath()

        const char *daemon_findpath(
                char const *command)
        

dir_getlist()

Get the list of files with a specific extension in a directory Return the number of entry placed in lst. The ending (extension) will be stripped from the filename. Return -1 if the directory can't be opened.

        int dir_getlist(
                const char *path,
                const char *ext,        // Ending of the file
                // Must include the . if you mean the extension
                SSTRINGS&lst)
        

dir_getlist_p()

Get the list of files (anything in fact) in a directory beginning with the same prefix

        int dir_getlist_p(
                const char *fpath,
                SSTRINGS&lst)

distrib_getrelease()

Obtain the release number of the distribution. Return unknown if it can't be identified.

        const char *distrib_getrelease(
                void)

distrib_getval()

        const char *distrib_getval(
                const char *key)
        

distrib_getvalnum()

Obtain distribution dependant information. Normally, this is not stored in conf.linuxconf, but the distribution related module act as a filter and may inject whatever value needed. This trickery is used to provide distribution dependant information. For example, does this distribution supports the command restart for the sysv init scripts.

        int distrib_getvalnum(
                const char *key,
                int defval)
        

distrib_isenhanced()

Tells if this distribution has been enhanced. This means that linuxconf relies 100% on sysv script to initialise anything. This defeats most of its internal rules.

        bool distrib_isenhanced(
                void)
        

distrib_replace()

        void distrib_replace(
                const char *key,
                const char *val)
        

error_setmode()

Control the error message handling (interactive or on stderr)

        void error_setmode(
                bool batch)
        

fclose()

Replacement for stdio function using FILE_CFG

        int fclose(
                FILE_CFG *fout)
        

feof()

Replacement for stdio function using FILE_CFG

        int feof(
                FILE_CFG *f)
        

fflush()

Replacement for stdio function using FILE_CFG

        int fflush(
                FILE_CFG *fout)
        

fgetc()

Replacement for stdio function using FILE_CFG

        int fgetc(
                FILE_CFG *f)
        

fgets()

Replacement for stdio function using FILE_CFG

        char *fgets(
                char *s,
                int size,
                FILE_CFG *fout)
        

fgets_comments()

Read lines and accumulate comments. buf will contain the first non comment, non empty line.

        const char *fgets_comments(
                char buf[],
                int size,
                FILE *fin,
                SSTRING&comments)
        

fgets_cont()

        int fgets_cont(
                char *buf,
                int size,
                FILE *fin)
        

fgets_long()

        char *fgets_long(
                char *&line,
                int &len,
                FILE_CFG *fin)
        

fgets_strip()

        char *fgets_strip(
                char *buf,
                int sizebuf,
                FILE_CFG *fin,
                char contcar,
                char comcar,
                int *noline)
        

file_copy()

Copy one file. Check if user is allowed Return -1 if any error.

        int file_copy(
                const char *src,
                const char *dst)
        

file_copytree()

Copy a complete directory tree into another optionnally for ownership and mode. If the owner and mode is not provided (-1), those of the source will be used.

        int file_copytree(
                const char *src,
                const char *dst,
                int uid,
                int gid,
                int mode)
        

file_create()

Create a file with proper permission set. Request root privilege to do this

        int file_create(
                const char *path,
                const char *owner,
                const char *group,
                int perm)
        

file_date()

Return the modification date of a file

        long file_date(
                const char *path)
        

file_exist()

Check if the file or directory exist. Return true if yes.

        bool file_exist(
                const char *path)
        

file_followlink()

Follow a symbolic link and extract the effective (real) path realpath will simply contain the original path if it is not a symlink. Return -1 if the link can't be read properly. Return 0 otherwise (even if fpath is not a symlink).

        int file_followlink(
                const char *fpath,
                char *realpath)

file_mkdir()

        int file_mkdir(
                const char *dir,
                const char *user,
                const char *group,
                int perm)
        

file_mkdirp()

Create a sub-directory and all parent directory if needed The directory may be already existing

        int file_mkdirp(
                const char *dir,
                const char *user,
                const char *group,
                int perm)
        

file_rtype()

Check the type of a file or directory. Return -1 if the path does not exist. Return 0 if this is a file 1 if this is a directory 2 if this is a device 3 if this is a symbolic link 4 if this is a fifo This function uses stat instead of lstat

        int file_rtype(
                const char *path)
        

file_type()

        int file_type(
                const char *path)
        

filecfg_new()

        FILE_CFG *filecfg_new(
                FILE *f,
                const CONFIG_FILE *cf)
        

filecfg_setrelink()

        void filecfg_setrelink(
                FILE_CFG *c)
        

fileno()

Replacement for stdio function using FILE_CFG

        int fileno(
                FILE_CFG *f)

fixperm_readperm()

        int fixperm_readperm(
                char const *,
                class PERMINFO&pinfo,
                char const *user,
                char const *group,
                int perm,
                bool)
        

fopen_cfg()

Replacement for stdio function using FILE_CFG

        FILE_CFG *fopen_cfg(
                const char *fname,
                const char *mode)
        

fprintf()

Replacement for stdio function using FILE_CFG

        int fprintf(
                FILE_CFG *fout,
                const char *ctl,
                ...)
        

fputc()

Replacement for stdio function using FILE_CFG

        int fputc(
                int c,
                FILE_CFG *f)
        

fputs()

Replacement for stdio function using FILE_CFG

        int fputs(
                const char *s,
                FILE_CFG *fout)
        

fread()

Replacement for stdio function using FILE_CFG

        int fread(
                void *ptr,
                size_t size,
                size_t n,
                FILE_CFG *fout)
        

fscanf()

Replacement for stdio function using FILE_CFG

        int fscanf(
                FILE_CFG *fin,
                const char *ctl,
                ...)
        

fseek()

Replacement for stdio function using FILE_CFG

        int fseek(
                FILE_CFG *f,
                long offset,
                int whence)
        

ftell()

Replacement for stdio function using FILE_CFG

        long ftell(
                FILE_CFG *f)
        

fviews_required()

To force this at link time (called by misc.cc)

        void fviews_required(
                void)
        

fwrite()

Replacement for stdio function using FILE_CFG

        int fwrite(
                const void *ptr,
                size_t size,
                size_t n,
                FILE_CFG *fout)
        

help_setlang()

Record the language to use for help files

        void help_setlang(
                const char *_lang,
                const char *envvar)
        

helpf_checkall()

Check if all the help file of the application are there. This is a runtime check even if it is only requiered for testing the software.

        void helpf_checkall(
                void)

html_access_check()

        int html_access_check(
                int)
        

html_access_log()

        void html_access_log(
                int,
                const char *)
        

ipnum_aip24()

Translate an IP number (ascii) into four numbers Return -1 if the IP number is invalid.

        int ipnum_aip24(
                const char *aip,
                int num4[4])
        

ipnum_aip2l()

Compute an IP number from a string.

        unsigned long ipnum_aip2l(
                const char *aip)
        

ipnum_getdefaultmask()

        const char *ipnum_getdefaultmask(
                const char *aip)
        

ipnum_ip2a()

        void ipnum_ip2a(
                struct hostent *ent,
                SSTRING&ip)
        

ipnum_validip()

Check is a string is valid IP number. if (ishost), check if the IP is not a broadcast or a network address.

        bool ipnum_validip(
                const char *aip,
                const char *netmask,    // aip must be a either valid
                // host or network according to this mask.
                // If netmask is not supplied, the default
                // netmask for that network is supplied
                bool ishost)
        

ipnum_validmask()

Check if a netmask is valid, in quad dot notation. Check if it made of a set of ones with trailing zeros.

        bool ipnum_validmask(
                const char *mask)

ipnum_validnet()

Validate a network number and netmask pair. The netmask may be empty. The standard netmask for that network will be used then.

        bool ipnum_validnet(
                const char *ip,
                const char *mask)
        

kernel_newer()

Return true if the running kernel is newer than v0.v1.v2

        bool kernel_newer(
                int v0,
                int v1,
                int v2)
        

kernel_version()

Probe the running kernel for its version and release

        int kernel_version(
                int v[3])
        

libmodules_required()

Just to force the linkage

        void libmodules_required(
                void)

linuxconf_archive()

Archive all section of conf.linuxconf corresponding to the subsystems.

        int linuxconf_archive(
                const char *subsys)
        

linuxconf_extract()

Extract the section of conf.linuxconf corresponding to a subsystem

        int linuxconf_extract(
                const char *subsys)
        

linuxconf_getcolormode()

Find out if linuxconf is allowed to use color in text mode

        bool linuxconf_getcolormode(
                void)
        

linuxconf_getguimode()

Find out if the GUI mode is allowed by the user. It will be turned off on some slow machine.

        bool linuxconf_getguimode(
                void)
        

linuxconf_getlang()

Get the selected language prefix (automatic or manual)

        const char *linuxconf_getlang(
                void)
        

linuxconf_getlangmanual()

Get the selected language prefix

        const char *linuxconf_getlangmanual(
                void)
        

linuxconf_getlangmode()

Get the selection mode for the language (manual = 0, automatic = 1)

        bool linuxconf_getlangmode(
                void)
        

linuxconf_getprefixtrig()

Get the threshold value to enable the filtering for long list. When a record list is longer than this threshold, a popup lets the user enter a search prefix. The default is 60 entries.

        int linuxconf_getprefixtrig(
                void)
        

linuxconf_loadlibmsg()

Load the messages for linuxconf lib The message are looked for in pkgdir first. If missing, they are looked for in /usr/lib/linuxconf-lib/

        void linuxconf_loadlibmsg(
                const char *pkgdir)
        

linuxconf_loadmsg()

Load the messages for a given module or linuxconf itself

        void linuxconf_loadmsg(
                const char *prefix,
                const char *rev)
        

linuxconf_md5sum()

Compute the md5 checksum of all section of conf.linuxconf corresponding to the subsystems.

        int linuxconf_md5sum(
                const char *subsys,
                SSTREAM&ss)
        

linuxconf_setcolormode()

        void linuxconf_setcolormode(
                bool mode)
        

linuxconf_setcursys()

Record the name of the subsystem which will own the next entries added

        void linuxconf_setcursys(
                const char *sys)
        

linuxconf_setdbpath()

Change the path of the /etc/conf.linuxconf file This function is used by application written with liblinuxconf wishing to use the linuxconf_xxx functions to save and retrieve their settings. This must be called early enough during application initialisation because the original file may be opened real soon.

        void linuxconf_setdbpath(
                const char *path)
        

linuxconf_setguimode()

        void linuxconf_setguimode(
                bool mode)
        

linuxconf_sethook()

Record the hook function so a module may co-manage the /etc/conf.linuxconf file.

        void linuxconf_sethook(
                CONFDB *(*fct)(CONFDB *))
        

linuxconf_setlang()

Record the operation language which will be used if -the selection mode is set to manual -or there is no setting in the environnement

        void linuxconf_setlang(
                const char *lang)
        

linuxconf_setlangmode()

Record the selection mode for the language

        void linuxconf_setlangmode(
                bool mode)
        

linuxconf_setprefixtrig()

        void linuxconf_setprefixtrig(
                int trig)
        

malloc_err()

Do a malloc with error message generation. It quit if out of memory.

        void *malloc_err(
                int size)
        

misc_required()

        void misc_required(
                void)

module_api_available()

Return true if an inter-module API is available

        bool module_api_available(
                const char *apiname,
                int version,
                const char *client)

module_api_required()

To make sure this is linked in

        void module_api_required(
                void)
        

module_config()

        void module_config(
                void)
        

module_dohtml()

Dispatch an HTML request to a module Return LNCF_NOT_APPLICABLE if no module accepted control.

        int module_dohtml(
                const char *key)
        

module_domenu()

Check if any module has something to do with this menu selection. Return != 0 if this menu event was managed by a module. Variation allowing arbitrary menus to be enhanced.

        int module_domenu(
                const char *menuid,
                const char *key)
        

module_execmain()

Try to pass control to a module based on argv[0] Return LNCF_NOT_APPLICABLE if no module accept control.

        int module_execmain(
                int argc,
                char *argv[],
                bool standalone)
        

module_fixperm()

Tell the different module to check their file permissions. Most of the time, those modules will call the function Return != 0 if there was any errors.

        int module_fixperm(
                bool boottime,
                bool silentflag)
        

module_get_api()

Get an API object from a module. Return NULL if this API is not available. Signal an error if several module provide the same API ( module_get_apis() should be used then)

        void *module_get_api(
                const char *apiname,
                int version,
                const char *client)     // Some message identifying the caller
        

module_get_apis()

#Specification: module apis / multiple providers In general, if several modules implement the same API, these modules are not used together. For example, the managerpm module defines the PACKAGE_API and one they the module managedeb will provide the same. But the module won't be used at the same time. In some case, several module may implement the same API concurently. The client has to be aware of that. Instead of using function like APINAME_api_init, it is using APINAME_apis_init. For example the firewall module expect many module will provide interface definition. So it does something like that. # FWINFO_API *tbapi[MAX_API_PROVIDERS]; int nb = fwinfo_get_apis ("ipfwrule",tb); for (int i=0; i<nb; i++){ tbapi[i]->getinfo (...) } fwinfo_release_apis (tb,nb); # This solution competes with the message (see module_sendmessage()) facility. The message mecanism is simpler to define, but is not strict: A bunch of strings are used as parameters.

Get all the API objects for a given API name. Return the number of API objects loaded in tb[].

        int module_get_apis(
                const char *apiname,
                int version,
                const char *client,     // Some message identifying the caller
                void *tbapi[MAX_API_PROVIDERS])
        

module_getlist()

Get the path of all loaded modules. It returns a SSTRINGS pointer. Do not delete it.

        const SSTRINGS *module_getlist(
                void)
        

module_hint()

Locate a module and let it produce some hints for the sysv init script Return LNCF_NOT_APPLICABLE if no module correspond

        int module_hint(
                const char *module)
        

module_is_enabled()

Return true if a module is enabled

        bool module_is_enabled(
                const char *path)
        

module_load()

Load all the linuxconf modules. If a module is already loaded, it won't be loaded twice. So this function may be called several time, generally after a module_setone() call.

        void module_load(
                void)
        

module_loadcheck()

        void module_loadcheck(
                const char *path)
        

module_loaddistmod()

        void module_loaddistmod(
                void)
        

module_locate()

Locate a module based on the version of linuxconf Return -1 if the module can't be found. realpath will contain the path linuxconf was looking for. Return the subrevision number.

        int module_locate(
                const char *basepath,   // base path of the module, without extension
                char *realpath) // Complete path as located
        

module_probe()

Probe the module for some update after configuration changes.

        int module_probe(
                int state,      // networking level 0, 1 or 2
                // at which state are we checking
                int target)     // idem, but the target of the general probe
        

module_register_api()

Record the provider of an API. This function is generally called at module initialisation time.

        void module_register_api(
                const char *apiname,
                int version,
                void *(*fctget)(),      // This return a pointer to the API struct
                // The server is free to return a newly
                // allocated struct or the same for every call
                void(*fctrelease)(void *))      // The release function does whatever it
                // wants to clean the API struct
        

module_release_api()

Release an API object

        void module_release_api(
                const char *apiname,
                void *api)
        

module_release_apis()

Release an API object

        void module_release_apis(
                const char *apiname,
                void *tbapi[],
                int nbapi)
        

module_requestpkg()

Send a message to a the distribution specific module so it can check if a given package is installed. logical_name is something like "popserver" "dhcpserver" and so on. The distribution module translate this name according to its packaging and check if it is installed. If not, it propose to install it. For example, the redhat module will check is imap is installed if popserver is requested. This strategy should help administrator get it right the first time. This opens a new concept: What is coming first, the admin tool, or the service. It seems the admin tool is a good ambassador here. The function returns 1 if the package was installed, 0 otherwise (maybe nothing was done or the package was already installed).

        int module_requestpkg(
                const char *logical_name)

module_sendmessage()

Send a message to all modules. Return 0 if all ok Return LNCF_NOT_APPLICABLE if no module proceed the message Return != 0 if any error (returned by the modules)

        int module_sendmessage(
                const char *msg,
                int argc,
                const char *argv[])
        

module_setmenu()

        void module_setmenu(
                class DIALOG&,
                MENU_CONTEXT)
        

module_setone()

Add a module to the list of active modules

        void module_setone(
                const char *path)
        

module_unsetone()

Remove a module from the list of active modules

        void module_unsetone(
                const char *path)
        

module_usage()

Retrieve the command line usage of all modules

        void module_usage(
                SSTRINGS&tb)
        

net_introlog()

        void net_introlog(
                int)
        

net_prtlog()

        void net_prtlog(
                int,
                char const *,
                ...)
        

perm_access()

        int perm_access(
                class PRIVILEGE *,
                char const *,
                ...)
        

perm_rootaccess()

        int perm_rootaccess(
                char const *,
                ...)
        

perm_setaccess()

        void perm_setaccess(
                const char *,
                const char *)
        

popen_getloginuid()

Get the UID of the user who is login on this terminal. Even if this user has done a "su" command, we can find out who he really is.

        int popen_getloginuid(
                void)
        

popen_initsignal()

        void popen_initsignal(
                void)
        

process_findchild()

        int process_findchild(
                int)
        

rewind()

Replacement for stdio function using FILE_CFG

        void rewind(
                FILE_CFG *f)
        

str3_required()

        void str3_required(
                void)
        

str6_required()

        void str6_required(
                void)
        

str_checkdig()

Check if a string is made of digits only. Return != 0 if yes.

        int str_checkdig(
                const char *str)
        

str_copyquote()

Copy a character sequence delimited by a quote charater. The first character of str is taken as the quote character. Two consecutive quote character are taken as an escape mecanism to incorporate a single quote in the string. The escape is '\\'. Return the address right after the closing quote. May optionnaly "compile" some C escape sequence The quote character are omitted.

        char *str_copyquote(
                char *dest,     // Will contain the string inside the quote.
                // May be NULL to skip a quote sequence.
                const char *str)        // String starting with a quote character

str_copyquotec()

Copy a character sequence delimited by a quote charater. The first character of str is taken as the quote character. Two consecutive quote character are taken as an escape mecanism to incorporate a single quote in the string. The escape character is normally '\\'. Return the address right after the closing quote. May optionnaly "compile" some C escape sequence The quote character are omitted.

        char *str_copyquotec(
                char *dest,     // Will contain the string inside the two delimiting
                // quote character.
                // May be NULL. Used to skip pass a sequence.
                const char *str,        // String beginning with a quote character (any).
                char escape,    // Generally '\\' or '\0' if no escape defined.
                bool compile)   // Should we translate C language special escape (such
                // as '\n'.
        

str_copyword()

        char *str_copyword(
                char *dest,
                const char *str,
                int size)
        

str_exptab()

Expand TABs in a string and convert to a bunch of spaces. Return the number of char written in dst. src may contain some '\n'. This is properly understood as a carriage return.

        int str_exptab(
                const char *src,
                int step,       // Number of spaces per tab
                char *dst)      // Will receive the result. dst may be the same as
                // src

str_extract()

Extract a string from a buffer. The string may be a single word or many words enclose in double quote.

        const char *str_extract(
                const char *buf,
                SSTRING&s)
        

str_isword()

Check if a string start with a given word followed by a space or '\0'; Return != 0 if this is true.

        int str_isword(
                const char *str,
                const char *word)
        

str_skip()

Skip the white space in a string. Stop at the end or at the first non white space.

        char *str_skip(
                const char *str)
        

str_skipdig()

Skip the digit space in a string. Stop at the end or at the first non digit character.

        char *str_skipdig(
                const char *str)
        

str_skipword()

Move over one word

        char *str_skipword(
                const char *str)
        

str_splitline()

Decompose a record in separate field (like /etc/passwd) Spaces between words are skiped. Words are limited to 99 characters. Return the number of field written in words

        int str_splitline(
                const char *line,       // Line to split
                char delim,     // Field delimiter
                SSTRINGS&words)     // Will contain the separated words

str_strip()

Strips all blank and line feed at the end of a string newstr and str may be the same string. Return the number of bytes striped at the end.

        int str_strip(
                const char *str,        // String to truncate
                char *newstr)   // result
        

strcpy_cut()

Like strncpy but make sure the '\0' is there size if the sizeof() of the destination. One byte is kept to put the '\0';

        void strcpy_cut(
                char *dst,
                const char *src,
                int size)
        

strdup_err()

Do a strdup with error message generation. It quit if out of memory.

        char *strdup_err(
                const char *str)

stricmp()

Why is it missing ?

        int stricmp(
                const char *str1,
                const char *str2)
        

strip_end()

Strip all blank (white space) at the end of a line. blanks are identified by isspace(). Return a pointer to the last character +1 (right on the '\0', the new one). ATTENTION: To help cooperate with some DOS editor, ^Z is processed as a white space.

        char *strip_end(
                char *str)
        

strupr()

Turn a string to upper case

        void strupr(
                char *str)
        

subsys_archive()

Archive some or all subsystem

        int subsys_archive(
                int nb,
                const char *tb[])
        

subsys_diff()

Produce a report of the difference between the current config files and the last one archived, for all or few subsystems.

        int subsys_diff(
                int nb,
                const char *tb[])
        

subsys_extract()

Extract all configuration file for the current profile version. It is overwriting the current one with the last one archived. A major undo!

        int subsys_extract(
                void)
        

subsys_getallsubsys()

Get the list of all sub-systems defined along with their title

        int subsys_getallsubsys(
                SSTRINGS&tb,
                SSTRINGS&titles)
        

subsys_history()

Produce a report showing the archive history of each configuration files for all or few subsystems.

        int subsys_history(
                int nb,
                const char *tb[])

subsys_md5sum()

Compute the md5 checksum of all archive file or some subsystem only

        int subsys_md5sum(
                int nb,
                const char *tb[])
        

sys_uptime()

Return the system uptime in seconds

        long sys_uptime(
                void)

tbstr_free()

Free all entry of the string table.

        void tbstr_free(
                char *tb[],
                int nb)
        

virtdb_main()

        int virtdb_main(
                int argc,
                char *argv[])

xconf_areyousure()

Return != 0 if the user confirm something.

        int xconf_areyousure(
                const char *msg)
        

xconf_delok()

Ask the user for a confirmation before deleting a record Return != 0 if ok.

        int xconf_delok(
                void)

xconf_error()

Print an error message in a popup

        void xconf_error(
                const char *msg,
                ...)
        

xconf_fopen()

Open a file and print an error message if it can't be done

        FILE *xconf_fopen(
                const char *fname,
                const char *mode)

xconf_fopencfg()

Open a configuration file and print an error message if it can't be done. Check if root access is needed and prompt the user for the root password if the program is setuid.

        FILE *xconf_fopencfg(
                PRIVILEGE *priv,
                const char *fname,
                const char *mode)

xconf_fopencfg_bypass()

Override the privilege checking associate with a file write

        void xconf_fopencfg_bypass(
                bool _bypass)
        

xconf_notice()

Print a notice to the user.

        void xconf_notice(
                const char *msg,
                ...)

xconf_quitwosave()

Return != 0 if the user accept to quit anyway.

        int xconf_quitwosave(
                void)
        

xconf_yesno()

Ask a question and return MENU_YES if the user answer yes. may Return MENU_NO or MENU_ESCAPE also

        MENU_STATUS xconf_yesno(
                const char *title,
                const char *prompt,
                HELP_FILE&helpfile) // Help file or help_nil
        

Next Previous Contents