Linux Manuals session 3

Section 3: library functions

  • |

    endutxent (3) Linux Manual Page

    getutent, getutid, getutline, pututline, setutent, endutent, utmpname – access utmp file entries Synopsis#include <utmp.h> struct utmp *getutent(void); struct utmp *getutid(const struct utmp *ut); struct utmp *getutline(const struct utmp *ut); struct utmp *pututline(const struct utmp *ut); void setutent(void); void endutent(void); int utmpname(const char *file); DescriptionNew applications should use the POSIX.1-specified "utmpx" versions of these functions; see…

  • |

    endutent (3) Linux Manual Page

    getutent, getutid, getutline, pututline, setutent, endutent, utmpname – access utmp file entries Synopsis#include <utmp.h> struct utmp *getutent(void); struct utmp *getutid(const struct utmp *ut); struct utmp *getutline(const struct utmp *ut); struct utmp *pututline(const struct utmp *ut); void setutent(void); void endutent(void); int utmpname(const char *file); DescriptionNew applications should use the POSIX.1-specified "utmpx" versions of these functions; see…

  • |

    endusershell (3) Linux Manual Page

    getusershell, setusershell, endusershell – get permitted user shells Synopsis#include <unistd.h> char *getusershell(void); void setusershell(void); void endusershell(void);Feature Test Macro Requirements for glibc (see feature_test_macros(7)): getusershell(), setusershell(), endusershell(): Since glibc 2.21: _DEFAULT_SOURCE In glibc 2.19 and 2.20: _DEFAULT_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500) Up to and including glibc 2.19: _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500)DescriptionThe getusershell() function returns the…

  • |

    endttyent (3) Linux Manual Page

    getttyent, getttynam, setttyent, endttyent – get ttys file entry Synopsis#include <ttyent.h> struct ttyent *getttyent(void); struct ttyent *getttynam(const char *name); int setttyent(void); int endttyent(void); DescriptionThese functions provide an interface to the file _PATH_TTYS (e.g., /etc/ttys). The function setttyent() opens the file or rewinds it if already open. The function endttyent() closes the file. The function getttynam()…

  • |

    endspent (3) Linux Manual Page

    getspnam, getspnam_r, getspent, getspent_r, setspent, endspent, fgetspent, fgetspent_r, sgetspent, sgetspent_r, putspent, lckpwdf, ulckpwdf – get shadow password file entry Synopsis/* General shadow password file API */ #include <shadow.h> struct spwd *getspnam(const char *name); struct spwd *getspent(void); void setspent(void); void endspent(void); struct spwd *fgetspent(FILE *stream); struct spwd *sgetspent(const char *s); int putspent(const struct spwd *p, FILE…

  • |

    endservent (3) Linux Manual Page

    getservent, getservbyname, getservbyport, setservent, endservent – get service entry Synopsis#include <netdb.h> struct servent *getservent(void); struct servent *getservbyname(const char *name, const char *proto); struct servent *getservbyport(int port, const char *proto); void setservent(int stayopen); void endservent(void);DescriptionThe getservent() function reads the next entry from the services database (see services(5)) and returns a servent structure containing the broken-out fields…

  • |

    endrpcent (3) Linux Manual Page

    getrpcent, getrpcbyname, getrpcbynumber, setrpcent, endrpcent – get RPC entry Synopsis#include <netdb.h> struct rpcent *getrpcent(void); struct rpcent *getrpcbyname(const char *name); struct rpcent *getrpcbynumber(int number); void setrpcent(int stayopen); void endrpcent(void);DescriptionThe getrpcent(), getrpcbyname(), and getrpcbynumber() functions each return a pointer to an object with the following structure containing the broken-out fields of an entry in the RPC program…

  • |

    endpwent (3) Linux Manual Page

    getpwent, setpwent, endpwent – get password file entry Synopsis#include <sys/types.h> #include <pwd.h> struct passwd *getpwent(void); void setpwent(void); void endpwent(void);Feature Test Macro Requirements for glibc (see feature_test_macros(7)): getpwent(), setpwent(), endpwent(): _XOPEN_SOURCE >= 500     || /* Glibc since 2.19: */ _DEFAULT_SOURCE     || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCEDescriptionThe getpwent() function returns a pointer to a structure containing the broken-out fields of a record from the password database…

  • |

    endprotoent (3) Linux Manual Page

    getprotoent, getprotobyname, getprotobynumber, setprotoent, endprotoent – get protocol entry Synopsis#include <netdb.h> struct protoent *getprotoent(void); struct protoent *getprotobyname(const char *name); struct protoent *getprotobynumber(int proto); void setprotoent(int stayopen); void endprotoent(void);DescriptionThe getprotoent() function reads the next entry from the protocols database (see protocols(5)) and returns a protoent structure containing the broken-out fields from the entry. A connection is…

  • |

    endnetgrent (3) Linux Manual Page

    setnetgrent, endnetgrent, getnetgrent, getnetgrent_r, innetgr – handle network group entries Synopsis#include <netdb.h> int setnetgrent(const char *netgroup); void endnetgrent(void); int getnetgrent(char **host, char **user, char **domain); int getnetgrent_r(char **host, char **user, char **domain, char *buf, size_t buflen); int innetgr(const char *netgroup, const char *host, const char *user, const char *domain);Feature Test Macro Requirements for glibc (see…

  • |

    endnetent (3) Linux Manual Page

    getnetent, getnetbyname, getnetbyaddr, setnetent, endnetent – get network entry Synopsis#include <netdb.h> struct netent *getnetent(void); struct netent *getnetbyname(const char *name); struct netent *getnetbyaddr(uint32_t net, int type); void setnetent(int stayopen); void endnetent(void);DescriptionThe getnetent() function reads the next entry from the networks database and returns a netent structure containing the broken-out fields from the entry. A connection is…

  • |

    endmntent (3) Linux Manual Page

    getmntent, setmntent, addmntent, endmntent, hasmntopt, getmntent_r – get filesystem descriptor file entry Synopsis#include <stdio.h> #include <mntent.h> FILE *setmntent(const char *filename, const char *type); struct mntent *getmntent(FILE *stream); int addmntent(FILE *stream, const struct mntent *mnt); int endmntent(FILE *streamp); char *hasmntopt(const struct mntent *mnt, const char *opt); /* GNU extension */ #include <mntent.h> struct mntent *getmntent_r(FILE *streamp,…

  • |

    endian (3) Linux Manual Page

    htobe16, htole16, be16toh, le16toh, htobe32, htole32, be32toh, le32toh, htobe64, htole64, be64toh, le64toh – convert values between host and big-/little-endian byte order Synopsis#include <endian.h> uint16_t htobe16(uint16_t host_16bits); uint16_t htole16(uint16_t host_16bits); uint16_t be16toh(uint16_t big_endian_16bits); uint16_t le16toh(uint16_t little_endian_16bits); uint32_t htobe32(uint32_t host_32bits); uint32_t htole32(uint32_t host_32bits); uint32_t be32toh(uint32_t big_endian_32bits); uint32_t le32toh(uint32_t little_endian_32bits); uint64_t htobe64(uint64_t host_64bits); uint64_t htole64(uint64_t host_64bits); uint64_t be64toh(uint64_t…

  • |

    endhostent (3) Linux Manual Page

    gethostbyname, gethostbyaddr, sethostent, gethostent, endhostent, h_errno, herror, hstrerror, gethostbyaddr_r, gethostbyname2, gethostbyname2_r, gethostbyname_r, gethostent_r – get network host entry Synopsis#include <netdb.h> extern int h_errno; struct hostent *gethostbyname(const char *name); #include <sys/socket.h> /* for AF_INET */ struct hostent *gethostbyaddr(const void *addr, socklen_t len, int type); void sethostent(int stayopen); void endhostent(void); void herror(const char *s); const char *hstrerror(int…

  • |

    endgrent (3) Linux Manual Page

    getgrent, setgrent, endgrent – get group file entry Synopsis#include <sys/types.h> #include <grp.h> struct group *getgrent(void); void setgrent(void); void endgrent(void);Feature Test Macro Requirements for glibc (see feature_test_macros(7)): setgrent(): _XOPEN_SOURCE >= 500     || /* Glibc since 2.19: */ _DEFAULT_SOURCE     || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCE getgrent(), endgrent(): Since glibc 2.22:     _XOPEN_SOURCE >= 500 ||         _DEFAULT_SOURCE Glibc 2.21 and earlier     _XOPEN_SOURCE >= 500         || /* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200809L         || /* Glibc versions <= 2.19: */ _BSD_SOURCE || _SVID_SOURCEDescriptionThe getgrent() function…

  • |

    endfsent (3) Linux Manual Page

    getfsent, getfsspec, getfsfile, setfsent, endfsent – handle fstab entries Synopsis#include <fstab.h> void endfsent(void); struct fstab *getfsent(void); struct fstab *getfsfile(const char *mount_point); struct fstab *getfsspec(const char *special_file); int setfsent(void); DescriptionThese functions read from the file /etc/fstab. The struct fstab is defined by: struct fstab {     char       *fs_spec;       /* block device name */     char       *fs_file;       /* mount point */     char       *fs_vfstype;    /* file-system type */     char       *fs_mntops;     /* mount options */     const char *fs_type;       /* rw/rq/ro/sw/xx…

  • |

    endaliasent (3) Linux Manual Page

    setaliasent, endaliasent, getaliasent, getaliasent_r, getaliasbyname, getaliasbyname_r – read an alias entry Synopsis#include <aliases.h> void setaliasent(void); void endaliasent(void); struct aliasent *getaliasent(void); int getaliasent_r(struct aliasent *result, char *buffer, size_t buflen, struct aliasent **res); struct aliasent *getaliasbyname(const char *name); int getaliasbyname_r(const char *name, struct aliasent *result, char *buffer, size_t buflen, struct aliasent **res); DescriptionOne of the databases available…

  • |

    end_ (3) Linux Manual Page

    QuantLib::ExtendedLeisenReimer – Leisen & Reimer tree: multiplicative approach. Synopsis#include <ql/experimental/lattices/extendedbinomialtree.hpp> Inherits ExtendedBinomialTree< ExtendedLeisenReimer >. Public Member FunctionsExtendedLeisenReimer (const boost::shared_ptr< StochasticProcess1D > &, Time end, Size steps, Real strike) Real underlying (Size i, Size index) const Real probability (Size, Size, Size branch) const Protected AttributesTime end_ Size oddSteps_ Real strike_ Real up_ Real down_ Real pu_…

  • |

    endOfMonth_ (3) Linux Manual Page

    QuantLib::IborIndex – base class for Inter-Bank-Offered-Rate indexes (e.g. Libor, etc.) Synopsis#include <ql/indexes/iborindex.hpp> Inherits QuantLib::InterestRateIndex. Inherited by Cdor, DailyTenorEuribor, DailyTenorEuribor365, DailyTenorEURLibor, DailyTenorLibor, Euribor, Euribor365, EURLibor, Jibar, Libor, Tibor, TRLibor, and Zibor. Public Member FunctionsIborIndex (const std::string &familyName, const Period &tenor, Natural settlementDays, const Currency &currency, const Calendar &fixingCalendar, BusinessDayConvention convention, bool endOfMonth, const DayCounter &dayCounter, const…

  • |

    endOfMonth (3) Linux Manual Page

    QuantLib::IborIndex – base class for Inter-Bank-Offered-Rate indexes (e.g. Libor, etc.) Synopsis#include <ql/indexes/iborindex.hpp> Inherits QuantLib::InterestRateIndex. Inherited by Cdor, DailyTenorEuribor, DailyTenorEuribor365, DailyTenorEURLibor, DailyTenorLibor, Euribor, Euribor365, EURLibor, Jibar, Libor, Tibor, TRLibor, and Zibor. Public Member FunctionsIborIndex (const std::string &familyName, const Period &tenor, Natural settlementDays, const Currency &currency, const Calendar &fixingCalendar, BusinessDayConvention convention, bool endOfMonth, const DayCounter &dayCounter, const…