Thread Tools Search this Thread
Special Forums Cybersecurity AF_UNIX versus AF_INET
# 1  
Old 10-08-2002

I'm using AF_INET in sockets for inter process communication on the same machine. Is AF_UNIX better for IPC on the same machine than AF_INET in terms of performance? If so, how much better? I would like to know if there is sample code available to test this. I'm running the program on Solaris.

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. SCO

Printing via hpnpf versus lp

Hi, We have a Unix 3.2v5.0.5. I installed a printer via scoadmin, HP network printer manager with network peripheral name an ip-adress. This is the configuration file : Code: root@sco1 # cat configurationBanner: on:AlwaysContent types: simpleDevice: /dev/null Interface:... (2 Replies)
Discussion started by: haezeban
2 Replies

2. Solaris

Solaris versus Centos

hi guys In a few days I will be working in a new Job my new chief told I will be using Solaris and since I know Centos-Red Hat-Fedora I would like to know if Solaris is that different from Centos and my other linux Flavors... by the way any good solaris manual thanks a lot (1 Reply)
Discussion started by: karlochacon
1 Replies

3. Shell Programming and Scripting

Bourne sh versus bash

Hi All, I know difference between shell(s) we are using, ie. sh, bash etc. But while writing shell script, is there any difference which shell I am using. and if yes, what are they? (4 Replies)
Discussion started by: Deei
4 Replies

4. Shell Programming and Scripting

Awk Versus Cut

Hello ALL, I am looking for a comparison in 2 commands using awk and cut that would replicate the following command below. This is completely for speed reasons checking apache logs for unique IPs. Contender #1 awk '{!a++}END{for(i in a) if ( a >10 ) print a,i }' access_log I need a... (6 Replies)
Discussion started by: jaysunn
6 Replies

5. Programming

C & TCP question: AF_INET vs AF_UNIX

Greetings! I am attempting to write a *basic* network client in C. I have manage to create a socket but I have doubts as far as using AF_INET vs AF_UNIX. At the present time, my client runs with AF_INET. Is AF_UNIX faster across hosts using the same OS flavor (Red Hat)? What is the difference... (1 Reply)
Discussion started by: Alan Christen
1 Replies

6. IP Networking

What does 'AF' of AF_INET stand for ?

as title. and how is it different from PF_INET ? also, any one knows sin_family , sin_port , sin_addr ..etc ? why are they called 'sin' ? finally, htons() host to network short , htonl() host to network long , ntohs() network to host short , ntohl() network to host long. why would... (6 Replies)
Discussion started by: trapeze
6 Replies

7. Shell Programming and Scripting

.chsrc Versus .login

All, I am trying to understand the difference between .login & .cshrc. My understanding here is, there is not much difference between .cshrc and .login. Both the files accomplish the same purpose. But the calling order is different. The .login file called only when you login after calling .cshrc... (1 Reply)
Discussion started by: govindts
1 Replies

8. UNIX for Advanced & Expert Users

cpio versus cp

I am copying a file system to another one. someone suggest me use find . -print |cpio -pdmv but I think cp -r should do the same thing. Am I right? In addition, by using " find . ", I got all the file names,, why do I have to use the -print option? Thanks a lot! (1 Reply)
Discussion started by: fredao
1 Replies

9. Shell Programming and Scripting

<LF> versus <CR>/<LF>

Hello, Can someone explain how to distinguish a LF character and a CR/LF character in a text file from a shell script. Thanks (1 Reply)
Discussion started by: jerardfjay
1 Replies

10. UNIX for Dummies Questions & Answers

CTRL+H versus ^? versus BACKSPACE

Hi Gurus! I recently got my shell account (HP UX v11) created by our sysadmin and am having problem deleting with the backspace key. After doing some reading, I believe I need to enter a custom "STTY..." statement in my profile. Can someone please help me with the correct "STTY" sequence... (3 Replies)
Discussion started by: alan
3 Replies
Login or Register to Ask a Question
SD_IS_FIFO(3)							    sd_is_fifo							     SD_IS_FIFO(3)

sd_is_fifo, sd_is_socket, sd_is_socket_inet, sd_is_socket_unix, sd_is_mq - Check the type of a file descriptor SYNOPSIS
#include <systemd/sd-daemon.h> int sd_is_fifo(int fd, const char *path); int sd_is_socket(int fd, int family, int type, int listening); int sd_is_socket_inet(int fd, int family, int type, int listening, uint16_t port); int sd_is_socket_unix(int fd, int type, int listening, const char* path, size_t length); int sd_is_mq(int fd, const char *path); DESCRIPTION
sd_is_fifo() may be called to check whether the specified file descriptor refers to a FIFO or pipe. If the path parameter is not NULL, it is checked whether the FIFO is bound to the specified file system path. sd_is_socket() may be called to check whether the specified file descriptor refers to a socket. It the family parameter is not AF_UNSPEC it is checked whether the socket is of the specified family (AF_UNIX, AF_INET, ...). If the type parameter is not 0 it is checked whether the socket is of the specified type (SOCK_STREAM, SOCK_DGRAM, ...). If the listening parameter is positive it is checked whether the socket is in accepting mode, i.e. listen() has been called for it. If listening is 0, it is checked whether the socket is not in this mode. If the parameter is negative, no such check is made. The listening parameter should only be used for stream sockets and should be set to a negative value otherwise. sd_is_socket_inet() is similar to sd_is_socket(), but optionally checks the IPv4 or IPv6 port number the socket is bound to, unless port is zero. For this call family must be passed as either AF_UNSPEC, AF_INET or AF_INET6. sd_is_socket_unix() is similar to sd_is_socket(), but optionally checks the AF_UNIX path the socket is bound to, unless the path parameter is NULL. For normal file system AF_UNIX sockets set the length parameter to 0. For Linux abstract namespace sockets set the length to the size of the address, including the initial 0 byte and set path to the initial 0 byte of the socket address. sd_is_mq() may be called to check whether the specified file descriptor refers to a POSIX message queue. If the path parameter is not NULL, it is checked whether the message queue is bound to the specified name. RETURN VALUE
On failure, these calls return a negative errno-style error code. If the file descriptor is of the specified type and bound to the specified address a positive return value is returned, otherwise zero. NOTES
These functions are provided by the reference implementation of APIs for new-style daemons and distributed with the systemd package. The algorithms they implement are simple, and can easily be reimplemented in daemons if it is important to support this interface without using the reference implementation. Internally, these function use a combination of fstat() and getsockname() to check the file descriptor type and where it is bound to. For details about the algorithms check the liberally licensed reference implementation sources: resp. sd_is_fifo() and the related functions are implemented in the reference implementation's sd-daemon.c and sd-daemon.h files. These interfaces are available as shared library, which can be compiled and linked to with the libsystemd-daemon pkg-config(1) file. Alternatively, applications consuming these APIs may copy the implementation into their source tree. For more details about the reference implementation see sd_daemon(7). These functions continue to work as described, even if -DDISABLE_SYSTEMD is set during compilation. SEE ALSO
systemd(1), sd-daemon(7), sd_listen_fds(3), systemd.service(5), systemd.socket(5) AUTHOR
Lennart Poettering <> Developer systemd 10/07/2013 SD_IS_FIFO(3)