trimdomain man page on FreeBSD

Man page or keyword search:  
man Server   9747 pages
apropos Keyword Search (all sections)
Output format
FreeBSD logo
[printable version]

TRIMDOMAIN(3)		 BSD Library Functions Manual		 TRIMDOMAIN(3)

     trimdomain — trim the current domain name from a host name

     System Utilities Library (libutil, -lutil)

     #include <sys/types.h>
     #include <libutil.h>

     trimdomain(char *fullhost, int hostsize);

     The function trimdomain() removes the current domain name from the passed
     fullhost name by writing a NUL character over the first period of the
     passed name.  The current domain name is determined by calling
     gethostname(3) and removing everything up to the first period.  The name
     is determined the first time this function is called and is cached for
     future use.

     The trimdomain() function will only trim the domain name if the passed
     fullname ends with the current domain name and if the length of the
     resulting host name does not exceed hostsize.

     If the passed fullname is actually a DISPLAY specification of the form
     host.domain:nn[.nn] and the domain name is the same as the local domain
     name, trimdomain() will remove the embedded domain name, copying the
     screen and display numbers to the end of the base host name and resulting
     in host:nn[.nn].

     The trimdomain() function does not return a value.


BSD				 April 7, 1999				   BSD

List of man pages available for FreeBSD

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
Vote for polarhome
Free Shell Accounts :: the biggest list on the net