Sponsored Content
Top Forums Programming Machine dependent problems when using Sockets. Post 302569569 by Corona688 on Monday 31st of October 2011 07:40:20 PM
Old 10-31-2011
It says 'socket operation on non-socket'. Somehow a non-socket got put in there...

You should print the FD of the socket you're sending to, and system("ls -l /proc/self/fd");

I suspect a buffer got overrun somewhere and the FD list corrupted with something unexpected. A buffer overrun would be very compiler dependent.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Editor dependent error?

Hi all, i did typed the following code in vi and executed it. #!/bin/sh //notice the blank line here. DATA=test echo "$DATA" There was no problem. I then deleted the file using the rm command. I used ultraedit typed in the same file. , FTP it in and i got the following output :... (2 Replies)
Discussion started by: new2ss
2 Replies

2. HP-UX

how can i make two dependent jobs into cron?

Hi all, How can i make two dependent jobs into crontab? means after the first job the second job should run in a single crontab entry in unix. (1 Reply)
Discussion started by: megh
1 Replies

3. Solaris

pkgrm without removing the dependent packages

Hi all, Is there any option to remove a package without removing the dependent packages.... ie, i need to remove a package, while trying to remove by using pkgrm command it says as some dependent packages also will get removed, i dont want to remove those dependent packages. (1 Reply)
Discussion started by: judi
1 Replies

4. Shell Programming and Scripting

Shell scripting problems - Commands not on local machine

Hello all- I have done a lot of searching tonight, but all leads seem to be dead ends. Forgive me if this has been covered, but I've searched the forum and the internet. I am having trouble building a shell script which uses SSH to login to our schools 1024 cluster grid. The issue that I am... (1 Reply)
Discussion started by: Sagan
1 Replies

5. Programming

shell scripting problems involving operations with remote machine

Hi, i have been developing a shell script to transfer a set of files from one ubuntu system to another. Task: while executing the script the files ( ls, dir, cat) in the source machine should transfer to destination machine(at /home/mac/mac/bin) While the script is executed once again, It... (0 Replies)
Discussion started by: srijith
0 Replies

6. Slackware

Context dependent symlinks

Ive got multiple PCs, sharing an NFS mounted home dir. For certain apps I would like to keep the config files host specific. Easy solution is to create symlinks to local folders for configs. Ideally I would still want the .config files to reside in the user home folder. Is it possible to... (2 Replies)
Discussion started by: agentrnge
2 Replies

7. UNIX for Advanced & Expert Users

AIX Dependent Module could not be loaded

I am encountering the above error , even after setting the environment variables correctly AFAIK. I've found sources that say LIBPATH is the shared library variable , and others that say LIB_PATH, so I set both: ========================= root@lipossrp01ga: # echo $gtm_dist ... (6 Replies)
Discussion started by: Clovis_Sangrail
6 Replies

8. AIX

Dependent modules libc.a and libpthreads.a

Hello I am trying to install ActivePerl Pro Studio and I am seeing the following errors. Could not load program ./setup: Symbol resolution failed for setup because: Symbol ___memcmp (number 1) is not exported from dependent module /usr/lib/libc.a(shr.o). ... (2 Replies)
Discussion started by: flagman5
2 Replies

9. Shell Programming and Scripting

Script to Start services based on dependent services on other AIX machine

Hi, I just started working on a script. After my research, i found a command which can help me: AIM: To build a script which starts the services (Services 1) on server 1 automatically whenever its down. And it has a dependency on other service (Service 2) on Server 2. So my script has to... (4 Replies)
Discussion started by: draghun9
4 Replies

10. IP Networking

Problems and doubts with sockets and timeouts

Hi! I need some help to understand a little bit more the behaviour about socket and TCP connections... Here is my problem I have a client and a server that were written in python. The server program wait until a message arrive and then print the message but if the message not arrive in a second... (2 Replies)
Discussion started by: Kovalevski
2 Replies
ICMP(4) 						   BSD Kernel Interfaces Manual 						   ICMP(4)

NAME
icmp -- Internet Control Message Protocol SYNOPSIS
#include <sys/socket.h> #include <netinet/in.h> int socket(AF_INET, SOCK_RAW, proto); DESCRIPTION
ICMP is the error and control message protocol used by IP and the Internet protocol family. It may be accessed through a ``raw socket'' for network monitoring and diagnostic functions. The proto parameter to the socket call to create an ICMP socket is obtained from getprotobyname(3). ICMP sockets are connectionless, and are normally used with the sendto and recvfrom calls, though the connect(2) call may also be used to fix the destination for future packets (in which case the read(2) or recv(2) and write(2) or send(2) system calls may be used). Outgoing packets automatically have an IP header prepended to them (based on the destination address). Incoming packets are received with the IP header and options intact. Non-privileged ICMP ICMP sockets can be opened with the SOCK_DGRAM socket type without requiring root privileges. The synopsis is the following: socket(AF_INET, SOCK_DGRAM, IPPROTO_ICMP) This can be used by non root privileged processes to send ICMP echo requests to gauge the quality of the connectivity to a host, to receive ICMP destination unreachable message for path MTU discovery, or to receveive time exceeded message for traceroute. Datagram oriented ICMP sockets offer a subset of the functionality available to raw ICMP sockets. Only IMCP request messages of the following types can be sent: ICMP_ECHO, ICMP_TSTAMP or ICMP_MASKREQ. The code field must be the value zero (0). The minimal length of an ICMP message request is eight (8) octets. The following IP level option can be used with datagram oriented ICMP sockets: IP_OPTIONS IP_HDRINCL IP_TOS IP_TTL IP_RECVOPTS IP_RECVRETOPTS IP_RECVDSTADDR IP_RETOPTS IP_MULTICAST_IF IP_MULTICAST_TTL IP_MULTICAST_LOOP IP_ADD_MEMBERSHIP IP_DROP_MEMBERSHIP IP_MULTICAST_VIF IP_PORTRANGE IP_RECVIF IP_IPSEC_POLICY IP_STRIPHDR When the IP option IP_HDRINCL is used, the provided IP header must obey the following rules: ip_v Must be IPVERSION (4); ip_hl Between 5 and 10 (inclusive); ip_tos Any value; ip_len Must be the total length of IP datagram (IP header + ICMP message); ip_id Must be zero, will be automatically set; ip_off Must be zero, will be automatically set; ip_ttl Any value; ip_p Must be IPPROTO_IP; ip_sum Value ignored, will be automatically set; ip_src Must be an IP address currently assigned to one of the local interface or INADDR_ANY; ip_dst Any address; ip_opts Any option. The maximum length of a IMCP message that can be sent is controlled by the sysctl variable net.inet.raw.maxdgram. DIAGNOSTICS
A socket operation may fail with one of the following errors returned: [EISCONN] when trying to establish a connection on a socket which already has one, or when trying to send a datagram with the destina- tion address specified and the socket is already connected; [ENOTCONN] when trying to send a datagram, but no destination address is specified, and the socket hasn't been connected; [ENOBUFS] when the system runs out of memory for an internal data structure; [EADDRNOTAVAIL] when an attempt is made to create a socket with a network address for which no network interface exists; [EINVAL] when an invalid value is used with IMCP datagram socket for a field of the IP or ICMP header. SEE ALSO
send(2), recv(2), intro(4), inet(4), ip(4) HISTORY
The icmp protocol appeared in 4.3BSD. 4.3 Berkeley Distribution June 19, 2002 4.3 Berkeley Distribution
All times are GMT -4. The time now is 06:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy