This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <strings.h> | |
| void bzero(void *dest, size_t nbytes); | |
| void bcopy(const void *src, void *dest, size_t nbytes); | |
| int bcmp(const void *ptr1, const void *ptr2, size_t nbytes); | |
| /* Returns: 0 if equal, nonzero if unequal */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <netinet/in.h> | |
| uint16_t htons(uint16_t host16bitvalue); | |
| uint32_t htonl(uint32_t host32bitvalue); | |
| /* Both return: value in network byte order */ | |
| uint16_t ntohs(uint16_t net16bitvalue); | |
| uint32_t ntohl(uint32_t net32bitvalue); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "unp.h" | |
| int | |
| main(int argc, char **argv) | |
| { | |
| union { | |
| short s; | |
| char c[sizeof(short)]; | |
| } un; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <unistd.h> /* System V */ | |
| #include <sys/ioctl.h> /* BSD and Linux */ | |
| int ioctl(int fd, int request, ...); | |
| /* Returns: −1 on error, something else if OK */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <fcntl.h> | |
| int fcntl(int fd, int cmd, ... /* int arg */ ); | |
| /* Returns: depends on cmd if OK (see following), −1 on error */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <unistd.h> | |
| int fsync(int fd); | |
| int fdatasync(int fd); | |
| /* Returns: 0 if OK, −1 on error */ | |
| void sync(void); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <unistd.h> | |
| int dup(int fd); | |
| int dup2(int fd, int fd2); | |
| /* Both return: new file descriptor if OK, −1 on error */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <unistd.h> | |
| ssize_t pread(int fd, void *buf, size_t nbytes, off_t offset); | |
| /* Returns: number of bytes read, 0 if end of file, −1 on error */ | |
| ssize_t pwrite(int fd, const void *buf, size_t nbytes, off_t offset); | |
| /* Returns: number of bytes written if OK, −1 on error */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # This script is to be run inside the container | |
| for n in hosts localtime nsswitch.conf resolv.conf services; | |
| do cp /etc/$n /var/spool/postfix/etc; | |
| done | |
| postfix start |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <unistd.h> | |
| ssize_t write(int fd, const void *buf, size_t nbytes); | |
| /* Returns: number of bytes written if OK, −1 on error */ |