Sponsored Content
Operating Systems Solaris getpeername: Transport endpoint is not connected Post 302731739 by DGPickett on Thursday 15th of November 2012 05:10:15 PM
Old 11-15-2012
Here is the packet by packet: A client sends a TCP syn bit packet from his socket to a listening socket on a server. The server sends a syn-ack packet back and sets up a connection filter to divert this clients packets to a child socket that is now considered possible 'connected' to the client, so the listener just gets new connection packets. Middle packets are just ack packets, as I recall. When idle, keep-alive packets are sent, to ensure timers do not expire saying there is a disconnect. Sometimes routers delete and fake these to reduce traffic! Either end could send a fin packet to close it, and expects a fin-ack packet back in response. If a code bit gets a stale socket, and asks for the peer name (remote ip and port), while the information is probably available, the fact that the connection is closed is deemed a more appropriate response -- no point beating a dead horse, as it were.

Last edited by DGPickett; 11-15-2012 at 06:47 PM..
This User Gave Thanks to DGPickett For This Post:
 

9 More Discussions You Might Find Interesting

1. Solaris

PLOGI failed state=Packet Transport error

Someone who can help me. the following error occur, what does it mean, and any possible solution you can give.thanks syslog: fp: NOTICE: fp(2): PLOGI to d5900 failed state=Packet Transport error , reason=No Connection (Database) $cat /var/adm/messages Nov 3 05:16:21 vfaus279 fp: ... (7 Replies)
Discussion started by: o_m_g
7 Replies

2. Shell Programming and Scripting

Transport to another server within a script.

I'm not sure how to phrase this... We currently have a server that we have to load a special kind of file onto, to do this we have a script that someone on my team wrote years ago called emm <file>. We recently added another server to our system, so every file that's added on one has to be added... (2 Replies)
Discussion started by: DeCoTwc
2 Replies

3. UNIX for Advanced & Expert Users

Transport Error

Dear Friends, I am using Solaris 10 on Sun Sparc T5120 with 4 HDD(Raid).I am getting transport error in one of my mirrored HDD c1t2d0. Below is a screen shot. I have replaced the HDD with new one but still the same. Any one can help???? c1t2d0 Soft Errors: 0 Hard Errors: 0... (1 Reply)
Discussion started by: solaris5.10
1 Replies

4. Shell Programming and Scripting

grep error: range endpoint too large

Hi, my problem: gzgrep "^.\{376\}8301685001120" filename /dev/null ###ERROR ### grep: RE error 11: Range endpoint too large. Whats my mistake? Is the position 376 to large for grep??? Thanks. (2 Replies)
Discussion started by: Timmää
2 Replies

5. Solaris

SC3.2 issue - cluster transport configuration not right - resulting fail

I am trying to set up a two host cluster. trouble is with the cluster transport configuration. i'm using e1000g2 and g3 for the cluster transport. global0 and global1 are my two nodes, and I am running the scinstall from global1. i think i should be expecting, is this: The following... (19 Replies)
Discussion started by: frustin
19 Replies

6. Solaris

What is the difference between softerrors,harderrors,transport errors?

what is the difference between softerrors,harderrors,transport errors? (3 Replies)
Discussion started by: tv.praveenkumar
3 Replies

7. Programming

Problem transport endpoint is not connected

i've made a simple program that change a string from lowercase to uppercase and from uppercase to lowercase. Server works until start client, after client run server give this error: "recv server fallita: Transport endpoint is not connected" why? i think that stream closed too soon or not? below... (1 Reply)
Discussion started by: tafazzi87
1 Replies

8. UNIX for Dummies Questions & Answers

transport errors in iostat

Hi Unix experts, I have a question regarding a disk failure seen in "iostat -Enm" output: # iostat -Enm c1t0d0 Soft Errors: 0 Hard Errors: 7 Transport Errors: 9 Vendor: FUJITSU Product: MAU3073NCSUN72G Revision: 0802 Serial No: 0514F005M0 Size: 73.40GB <73400057856 bytes> Media... (5 Replies)
Discussion started by: dyavuzy1
5 Replies

9. Solaris

Determine PCI Endpoint for a Serial Interface.

Hi Folks, Here is one for the real Solaris aficionados on the site; I have a T5240 and have to create an I/O domain with access to the serial port, in this case /dev/term/a and although I have been through the documentation I'm having some issues in identifying the device to assign. What I... (2 Replies)
Discussion started by: gull04
2 Replies
DIVERT(4)						   BSD Kernel Interfaces Manual 						 DIVERT(4)

NAME
divert -- kernel packet diversion mechanism SYNOPSIS
#include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> int socket(PF_INET, SOCK_RAW, IPPROTO_DIVERT); To enable support for divert sockets, place the following lines in the kernel configuration file: options IPFIREWALL options IPDIVERT Alternatively, to load divert as a module at boot time, add the following lines into the loader.conf(5) file: ipfw_load="YES" ipdivert_load="YES" DESCRIPTION
Divert sockets are similar to raw IP sockets, except that they can be bound to a specific divert port via the bind(2) system call. The IP address in the bind is ignored; only the port number is significant. A divert socket bound to a divert port will receive all packets diverted to that port by some (here unspecified) kernel mechanism(s). Packets may also be written to a divert port, in which case they re- enter kernel IP packet processing. Divert sockets are normally used in conjunction with FreeBSD's packet filtering implementation and the ipfw(8) program. By reading from and writing to a divert socket, matching packets can be passed through an arbitrary ``filter'' as they travel through the host machine, special routing tricks can be done, etc. READING PACKETS
Packets are diverted either as they are ``incoming'' or ``outgoing.'' Incoming packets are diverted after reception on an IP interface, whereas outgoing packets are diverted before next hop forwarding. Diverted packets may be read unaltered via read(2), recv(2), or recvfrom(2). In the latter case, the address returned will have its port set to some tag supplied by the packet diverter, (usually the ipfw rule number) and the IP address set to the (first) address of the interface on which the packet was received (if the packet was incoming) or INADDR_ANY (if the packet was outgoing). The interface name (if defined for the packet) will be placed in the 8 bytes following the address, if it fits. WRITING PACKETS
Writing to a divert socket is similar to writing to a raw IP socket; the packet is injected ``as is'' into the normal kernel IP packet pro- cessing using sendto(2) and minimal error checking is done. Packets are distinguished as either incoming or outgoing. If sendto(2) is used with a destination IP address of INADDR_ANY, then the packet is treated as if it were outgoing, i.e., destined for a non-local address. Oth- erwise, the packet is assumed to be incoming and full packet routing is done. In the latter case, the IP address specified must match the address of some local interface, or an interface name must be found after the IP address. If an interface name is found, that interface will be used and the value of the IP address will be ignored (other than the fact that it is not INADDR_ANY). This is to indicate on which interface the packet ``arrived''. Normally, packets read as incoming should be written as incoming; similarly for outgoing packets. When reading and then writing back pack- ets, passing the same socket address supplied by recvfrom(2) unmodified to sendto(2) simplifies things (see below). The port part of the socket address passed to the sendto(2) contains a tag that should be meaningful to the diversion module. In the case of ipfw(8) the tag is interpreted as the rule number after which rule processing should restart. LOOP AVOIDANCE
Packets written into a divert socket (using sendto(2)) re-enter the packet filter at the rule number following the tag given in the port part of the socket address, which is usually already set at the rule number that caused the diversion (not the next rule if there are several at the same number). If the 'tag' is altered to indicate an alternative re-entry point, care should be taken to avoid loops, where the same packet is diverted more than once at the same rule. DETAILS
If a packet is diverted but no socket is bound to the port, or if IPDIVERT is not enabled or loaded in the kernel, the packet is dropped. Incoming packet fragments which get diverted are fully reassembled before delivery; the diversion of any one fragment causes the entire packet to get diverted. If different fragments divert to different ports, then which port ultimately gets chosen is unpredictable. Note that packets arriving on the divert socket by the ipfw(8) tee action are delivered as-is and packet fragments do not get reassembled in this case. Packets are received and sent unchanged, except that packets read as outgoing have invalid IP header checksums, and packets written as outgo- ing have their IP header checksums overwritten with the correct value. Packets written as incoming and having incorrect checksums will be dropped. Otherwise, all header fields are unchanged (and therefore in network order). Binding to port numbers less than 1024 requires super-user access, as does creating a socket of type SOCK_RAW. ERRORS
Writing to a divert socket can return these errors, along with the usual errors possible when writing raw packets: [EINVAL] The packet had an invalid header, or the IP options in the packet and the socket options set were incompatible. [EADDRNOTAVAIL] The destination address contained an IP address not equal to INADDR_ANY that was not associated with any interface. SEE ALSO
bind(2), recvfrom(2), sendto(2), socket(2), ipfw(4), ipfw(8) AUTHORS
Archie Cobbs <archie@FreeBSD.org>, Whistle Communications Corp. BUGS
This is an attempt to provide a clean way for user mode processes to implement various IP tricks like address translation, but it could be cleaner, and it is too dependent on ipfw(8). It is questionable whether incoming fragments should be reassembled before being diverted. For example, if only some fragments of a packet destined for another machine do not get routed through the local machine, the packet is lost. This should probably be a settable socket option in any case. BSD
December 17, 2004 BSD
All times are GMT -4. The time now is 09:41 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy