Sponsored Content
Top Forums UNIX for Dummies Questions & Answers what is the advantage of unix sockets? Post 302525367 by DGPickett on Thursday 26th of May 2011 12:55:41 PM
Old 05-26-2011
TCP and UDP are different facilities under IP, but UNIX sockets are local to the host and simpler, like pipes.

TCP creates a reliable one on one session between a client and server, with full duplex streams of data.

UDP is a user-level packet facility, without 'reliability' but with broadcast and mixed correspondent capability as well as a 'connection' facility, just a fd with a filter and default correspondent. For instance, DNS uses UDP, and a DNS server sits there receiving packets, and for every packet in, makes a packet out. The packet in may be a request for local data, a request for remote data or a response to a past inquiry sent by this server to other DNS servers. The server sends a response to the inquiry, or if tasked with recursion, an inquiry for the inquiry. For responses, the server sends them on to the requestor and caches them locally. The server does all this with one not-connected UDP socket.
 

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Does automount have an advantage over hard mount?

? (1 Reply)
Discussion started by: 98_1LE
1 Replies

2. HP-UX

fd passing between Independent processes using unix domain sockets

Hi, I am having some error handling issues with and fd passed between Independent processes using unix domain sockets (On HPUX). Here is the scnerio ================= Step 1: TPC/Client (connect()) ---Connects to ------TCP/Server(Gateway) (server gets fd) Step 2: ... (2 Replies)
Discussion started by: Debasisb2002
2 Replies

3. UNIX for Advanced & Expert Users

UNIX Message Queues vs. Sockets

If I use sockets for IPC, and can easily distribute my applications. UNIX Message Queues are local to the processor. As I understand it, Message Queues still incur system call overhead, just like socket calls. What advantage does a UNIX Message Queue provide versus a TCP or UDP Socket,... (2 Replies)
Discussion started by: zen29sky
2 Replies

4. UNIX for Advanced & Expert Users

UNIX domain sockets vs FIFOs

Is there a performance advantage of one of these over the other? Obviously, it makes no sense to use normal TCP sockets or UDP sockets w/ the overhead they carry. But what about UNIX domain sockets vs FIFOs? I'd think they'd be very similar, in terms of performance and in terms of how they're... (2 Replies)
Discussion started by: mgessner
2 Replies

5. Shell Programming and Scripting

bash: one advantage of the ability to look for either synonym?

Hi I'm reading <learning the bash shell>. And in the section - 3.1. The .bash_profile, .bash_logout, and .bashrc Files bash allows two synonyms for .bash_profile: .bash_login, derived from the C shell's file named .login, and .profile, derived from the Bourne shell and Korn shell files... (1 Reply)
Discussion started by: password636
1 Replies

6. Solaris

advantage of v490 over 480R

What are the advantages for Sun Fire 490 over Sun Fire 480 R just from a server performance perspective? Or, are they both just about the same? (1 Reply)
Discussion started by: jtamminen
1 Replies

7. Red Hat

Cobbler - what is the advantage?

Hi guys, new user here, so please be gentle. I need to build a lot of servers at work on a weekly basis with various versions of RH and additional applications. We use PXE/Kickstart to do this with selections made from a simple menu structure. However, I keep hearing about Cobbler and... (0 Replies)
Discussion started by: hankpym
0 Replies
Net::DNS::Header(3)					User Contributed Perl Documentation				       Net::DNS::Header(3)

NAME
Net::DNS::Header - DNS packet header SYNOPSIS
use Net::DNS; $packet = new Net::DNS::Packet; $header = $packet->header; DESCRIPTION
"Net::DNS::Header" represents the header portion of a DNS packet. METHODS
new $header = new Net::DNS::Header($packet); Constructor method which returns a "Net::DNS::Header" object representing the header section of the specified packet. decode $header->decode($data); Decodes the header record at the start of a DNS packet. The argument is a reference to the packet data. encode $header->encode($data); Returns the header data in binary format, appropriate for use in a DNS packet. string print $packet->header->string; Returns a string representation of the packet header. id print "query id = ", $packet->header->id, " "; $packet->header->id(1234); Gets or sets the query identification number. A random value is assigned if the argument value is undefined. opcode print "query opcode = ", $packet->header->opcode, " "; $packet->header->opcode("UPDATE"); Gets or sets the query opcode (the purpose of the query). rcode print "query response code = ", $packet->header->rcode, " "; $packet->header->rcode("SERVFAIL"); Gets or sets the query response code (the status of the query). qr print "query response flag = ", $packet->header->qr, " "; $packet->header->qr(0); Gets or sets the query response flag. aa print "answer is ", $packet->header->aa ? "" : "non-", "authoritative "; $packet->header->aa(0); Gets or sets the authoritative answer flag. tc print "packet is ", $packet->header->tc ? "" : "not ", "truncated "; $packet->header->tc(0); Gets or sets the truncated packet flag. rd print "recursion was ", $packet->header->rd ? "" : "not ", "desired "; $packet->header->rd(0); Gets or sets the recursion desired flag. ra print "recursion is ", $packet->header->ra ? "" : "not ", "available "; $packet->header->ra(0); Gets or sets the recursion available flag. z Unassigned bit, should always be zero. ad print "The result has ", $packet->header->ad ? "" : "not", "been verified "; Relevant in DNSSEC context. (The AD bit is only set on answers where signatures have been cryptographically verified or the server is authoritative for the data and is allowed to set the bit by policy.) cd print "checking was ", $packet->header->cd ? "not" : "", "desired "; $packet->header->cd(0); Gets or sets the checking disabled flag. qdcount, zocount print "# of question records: ", $packet->header->qdcount, " "; Gets the number of records in the question section of the packet. In dynamic update packets, this field is known as "zocount" and refers to the number of RRs in the zone section. ancount, prcount print "# of answer records: ", $packet->header->ancount, " "; Returns the number of records in the answer section of the packet which may, in the case of corrupt packets, differ from the actual number of records. In dynamic update packets, this field is known as "prcount" and refers to the number of RRs in the prerequisite section. nscount, upcount print "# of authority records: ", $packet->header->nscount, " "; Returns the number of records in the authority section of the packet which may, in the case of corrupt packets, differ from the actual number of records. In dynamic update packets, this field is known as "upcount" and refers to the number of RRs in the update section. arcount, adcount print "# of additional records: ", $packet->header->arcount, " "; Returns the number of records in the additional section of the packet which may, in the case of corrupt packets, differ from the actual number of records. In dynamic update packets, this field is known as "adcount". EDNS Protocol Extensions do print "DNSSEC_OK flag was ", $packet->header->do ? "not" : "", "set "; $packet->header->do(1); Gets or sets the EDNS DNSSEC OK flag. Extended rcode EDNS extended rcodes are handled transparently by $packet->header->rcode(). UDP packet size $udp_max = $packet->edns->size; $udp_max = $packet->header->size; EDNS offers a mechanism to advertise the maximum UDP packet size which can be assembled by the local network stack. UDP size advertisement can be viewed as either a header extension or an EDNS feature. Endless debate is avoided by supporting both views. edns $header = $packet->header; $version = $header->edns->version; @options = $header->edns->options; $option = $header->edns->option(n); $udp_max = $packet->edns->size; Auxiliary function which provides access to the EDNS protocol extension OPT RR. COPYRIGHT
Copyright (c)1997-2002 Michael Fuhr. Portions Copyright (c)2002-2004 Chris Reinhardt. Portions Copyright (c)2012 Dick Franks. All rights reserved. This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO
perl, Net::DNS, Net::DNS::Packet, Net::DNS::RR::OPT RFC 1035 Section 4.1.1 perl v5.16.3 2012-12-28 Net::DNS::Header(3)
All times are GMT -4. The time now is 06:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy