DOMAIN(3) Domain/OS BSD DOMAIN(3)
NAME
domain - Domain/OS-specific C library subroutines
DESCRIPTION
While providing all of the significant functionality of 4.3 BSD,
Domain/OS BSD actually represents only a subset of the greater
functionality of Domain/OS. Furthermore, Domain/OS BSD omits some
features of 4.3 BSD that are irrelevant to Apollo workstations. The
following paragraphs describe aspects of that greater functionality that
are visible to the Domain/OS BSD applications programmer and summarize
features of 4.3 BSD not implemented under Domain/OS BSD.
Domain/OS Calls. All of the interfaces giving applications access to the
greater functionality of Domain/OS can be called from Domain/OS BSD. The
declarations for these calls have been prototyped according to ANSI
standard C and placed in /usr/include/apollo. See the Domain/OS Call
Reference for more information on these interfaces.
Organization ID. Domain/OS BSD derives file access permissions from
Domain/OS "Access Control Lists" (ACLs). Domain/OS BSD derives
permissions for the owner and group of an object from analogous entries
in the ACL. It derives permissions for "others," however, from at least
two entries in the ACL, one of which sets the access rights for the
organization. For more information, see "Protection of Files and
Directories" in Domain/OS System Administration Reference.
Domain/OS BSD provides some of this extended functionality by way of an
organization ID that extends your means for controlling access to files.
Three C-language subroutines enable you to manipulate the organization
ID:
___________________________________________
____________Unique_Subroutines_____________|
| Name | Function | Reference |
___________________________________________|
|setoid | | setoid(3) |
|seteoid | set organization ID | |
_setroid___________________________________|
Domain/OS BSD also provides three system calls for manipulating the
organization ID. getoid(2) describes getoid and geteoid and setreoid(2)
describes setreoid.
Organization File. In addition to the /etc/passwd and /etc/group files
for storing information about user and group accounts, Domain/OS BSD
provides a file for storing information about organization accounts,
/etc/org. See org(5) and "Creating and Maintaining the Registry" in
Domain/OS System Administration Reference for more information about the
organization file.
Domain/OS BSD also provides six subroutines that constitute a C-language
interface to the organization file:
______________________________________________
______________Unique_Subroutines______________|
| Name | Function | Reference |
______________________________________________|
|getorgent | | |
|getorgid | | |
|getorgnam | get organization | getorgent(3) |
|setorgent | file entry | |
|endorgent | | |
_setorgfile___________________________________|
Registry Server. Under Domain/OS BSD, /etc/passwd is a read-only object
of the type "passwd," and /etc/group is a read-only object of the type
"group," both maintained by the registry server (see rgyd(8) and
"Creating and Maintaining the Registry" in Domain/OS System
Administration Reference. The conventional C-language interfaces to
these files (described in getgrent(3) and getpwent(3)) interact with the
registry server transparently.
For those desiring more control, however, Domain/OS BSD provides two
additional subroutines: setpwfile and setgrfile. These allow you to
specify the password file and group file, respectively. In this case,
the subroutines interact with the named file in ways determined by its
type manager.
COFF Interfaces. Apollo compilers and the Domain/OS BSD link editor
(ld(1)) produce output in common object file format (COFF). The
interfaces to COFF objects conventionally provided by UNIX System V
Release 3 are also available in Domain/OS BSD. Domain/OS BSD, however,
provides three additional interfaces:
____________________________________________________
_________________Unique_Subroutines_________________|
| Name | Function | Reference |
____________________________________________________|
|ldgetarname | retrieve the | ldgetarname(3X) |
| | filename of a | |
| | member of an | |
_______________archive_file_________________________|
|ldgetstring | retrieve string | ldgetstring(3X) |
| | from common object | |
| | file string table | |
____________________________________________________|
|ldsgetname | retrieve section | ldsgetname(3X) |
| | name for common | |
_______________object_file_entry____________________|
Support for Standard C. The Domain/OS BSD C library complies fully with
the semantics and syntax of ANSI standard C. The new functions that come
with this support include the following:
___________________________________________________________
____________________Unique_Subroutines_____________________|
| Name | Function | Reference |
___________________________________________________________|
_labs_________integer_absolute_value___________abs(3)______|
|strtod | | |
|strtol | convert ASCII to numbers | atof(3) |
|strtoul | | |
___________________________________________________________|
_bsearch______binary_search_a_sorted_table_____bsearch(3)__|
|clock | report CPU time used | clock(3) |
___________________________________________________________|
_strftime_____convert_date_and_time_to_ASCII___ctime(3)____|
|difftime | compute the difference between | difftime(3) |
| | two calendar times | |
___________________________________________________________|
|div | integer division | div(3) |
_ldiv______________________________________________________|
|atexit | terminate a process after | exit(3) |
| | flushing any pending output | |
___________________________________________________________|
|ceil | absolute value, floor, | |
|fabs | ceiling, remainder, and | floor(3M) |
|floor | round-to-nearest | |
_fmod______________________________________________________|
|fgetpos | | |
|fsetpos | reposition a stream | fseek(3S) |
___________________________________________________________|
|lconv | | |
|locale | set or get locale or numerical | locale(3) |
|localeconv | formatting information | |
_setlocale_________________________________________________|
_____________________________________________________________
_____________________Unique_Subroutines______________________|
| Name | Function | Reference |
_____________________________________________________________|
|memchr | | |
|memcmp | | |
|memcpy | memory operations | memory(3) |
|memmove | | |
_memset______________________________________________________|
|mktime | convert broken-down time to | mktime(3) |
| | calendar time | |
_____________________________________________________________|
_strerror___system_error_messages________________perror(3)___|
|raise | send a signal | raise(3) |
_____________________________________________________________|
_remove_____remove_a_file________________________remove(3)___|
|strchr | | |
|strcoll | | |
|strpbrk | | |
|strrchr | | |
|strspn | string operations | string(3) |
|strstr | | |
|strtok | | |
|strxfrm | | |
_____________________________________________________________|
_tmpfile____create_a_temporary_file______________tmpfile(3S)_|
|tmpnam | create a name for a temporary file | tmpnam(3S) |
_____________________________________________________________|
|mblen | | |
|mbstowcs | convert multibyte characters and | |
|mbtowc | strings to wide characters and | wctomb(3) |
|wcstombs | strings and back | |
_wctomb______________________________________________________|
Domain/OS BSD omits the following C-language subroutines, implemented in
the "Virtual VAX-11 Version" of the 4.3 Berkeley Software Distribution:
__________________________________________________________
_________________Unsupported_Subroutines__________________|
| Name | Function | Reference (4.3 BSD |
| | | manuals) |
__________________________________________________________|
|getdiskbyname | get disk | getdisk(3) |
| | description by its | |
_________________name_____________________________________|
|infnan | signals invalid | infnan(3M) |
| | floating-point | |
| | operations on a VAX | |
| | (none of 4.3 BSD's | |
| | math support | |
| | specific to VAX | |
| | hardware applies to | |
| | Apollo | |
| | workstations) | |
__________________________________________________________|
|lib2648 | subroutines for the | lib2648(3X) |
| | HP 2648 graphics | |
_________________terminal_________________________________|
|ns_addr | Xerox Network | |
|ns_ntoa | Services address | ns(3N) |
| | conversion routines | |
__________________________________________________________|
|vlimit | control maximum | vlimit(3C) |
| | system resource | |
_________________consumption______________________________|
|vtimes | get information | vtimes(3C) |
| | about resource | |
| | utilization | |
__________________________________________________________|
Domain/OS BSD provides no /lib/libm.a. It places its math subroutines in
/lib/libc. There also are no /lib/libc.a or libraries compiled for
profiling.
Domain/OS BSD manual pages describing specific features may point out
other differences. These descriptions usually appear in the "Notes"
section.
Additional Standard Support. Domain/OS BSD also provides the following
functionality:
New interfaces based on POSIX IEEE 1003.1A, XPG/3, and OSF OSC AES
(Application Environment Specification)
Internationalization functions
POSIX IEEE 1003.4a (draft 4) based Pthreads calls
Mach-based Kernel Threads interfaces
The following standards-based man pages have been added:
cfgetispeed
cfgetospeed
cfsetispeed
cfsetospeed
pathconf
setpgid
setsid
sigaction
siglongjmp
sigpending
sigprocmask
sigsetjmp
sigsetops
sigsuspend
tcdrain
tcflow
tcflush
tcgetattr
tcgetpgrp
tcsendbreak
tcsetattr
tcsetpgrp
termios
getclock
gettimer
mktimer
msem_init
msem_lock
msem_remove
msem_unlock
reltimer
rmtimer
setclock
clearenv
fsync
The following Pthreads man pages have been added:
pthread_attr_create
pthread_attr_delete
pthread_attr_getstacksize
pthread_attr_setstacksize
pthread_cancel
pthread_cleanup_pop
pthread_cleanup_push
pthread_cond_broadcast
pthread_cond_destroy
pthread_cond_init
pthread_cond_signal
pthread_cond_timedwait
pthread_cond_wait
pthread_condattr_create
pthread_condattr_delete
pthread_create
pthread_detach
pthread_equal
pthread_exit
pthread_getspecific
pthread_join
pthread_keycreate
pthread_mutex_destroy
pthread_mutex_init
pthread_mutex_lock
pthread_mutex_trylock
pthread_mutex_unlock
pthread_mutexattr_create
pthread_mutexattr_delete
pthread_once
pthread_self
pthread_setasynccancel
pthread_setcancel
pthread_setspecific
pthread_testcancel
pthread_yield
The following Mach-based Threads man pages have been added:
thread_abort
thread_cleanup
thread_create
thread_handle_signals
thread_info
thread_inhibit
thread_resume
thread_self
thread_set_priority
thread_startup
thread_state
thread_suspend
thread_terminate
threadp_get
threadp_init
threadp_set
The following man pages for reentrant code and related functions have
been added:
flockfile
funlockfile
unlocked_getc
unlocked_putc
asctime_r
getgrgid_r
getpwuid_r
strtok_r
ctime_r
getgrnam_r
gmtime_r
ttyname_r
getlogin_r
localtime_r
readdir_r
getpwnam_r
opendir_r
The following man pages supporting internationalization (I18N) have been
added:
catclose
catgets
catopen
localeconv
nl_langinfo
SEE ALSO
domain(2), setreoid(2), getoid(2), abs(3), atof(3), bsearch(3), clock(3),
ctime(3), difftime(3), div(3), exit(3), floor(3M), fseek(3S),
getorgent(3), getpwent(3), ldgetarname(3X), ldgetstring(3X),
ldsgetname(3X), locale(3), memory(3), mktime(3), perror(3), raise(3),
remove(3), setoid(3), string(3), tmpfile(3S), tmpnam(3S), wctomb(3),
domain(4), a.out(5), domain(5).
Domain/OS Call Reference.
Domain/OS System Administration Reference.