Networking :: How Many Possible Sockets On 64-bit

Jan 24, 2011

What's the total no. that the OS can create? Does this differ from 32-bit?

View 1 Replies


ADVERTISEMENT

Networking :: How To Send A File Using Sockets ?

Jun 25, 2010

Hi ,

I created a socket.port no 21 meaning ftp client.
I am sending some stings and receviing some data from server.Fine.

But I want to send a file some x.c to host using socket.
Please can someone help me whether we can do it or not.
If we can how can we send a file.I was only able to send buffer and data but not a file.Please if possible can you help me with example.

Regards,
shaiva

View 2 Replies View Related

Networking :: Cannot Open Sockets In Computer

Sep 14, 2010

The problem started when I noticed I couldn't upload to people using a torrent downloading program, the program listened on port X and when I sniffed on the same port I saw that syn's are forwarded correctly from my nat to that port but the program doesn't relate to those packets. Then I listened with NC, and even on another port nothing is being answered to those syns packets.

View 3 Replies View Related

Networking :: Bad: Two Sockets Of Different Ports In A Single Program?

Mar 4, 2011

I am trying to make a file proxy server...that is any request of file a client makes goes to the proxy server...it checks it in cache if not there then asks main server for the file. to act as a server for client and as client for server...how to do it in a single program. I tried with 2sockets with different ports one for client-proxy server and one for proxyserver-main server.But it does not workAm i doing something wrong or is there any other method

View 2 Replies View Related

Networking :: How To Receive ICMP Messages In UDP Sockets

Jul 9, 2009

I have a C program which does.

1. Creates a UDP socket
2. Send the UDP Request packet to the TFTP server.
3. If the TFTP server is not listening in the 69 port, the remote machine send an ICMP ("Port Unreachable") message.

Is there a way to receive a notification from the Linux kernel on receipt of an ICMP packet to the created UDP socket.

View 1 Replies View Related

Networking :: HTTPD Not Starting - No Listening Sockets Available

Sep 29, 2010

root@HOST [~]# /etc/init.d/httpd start
Starting httpd: no listening sockets available, shutting down
Unable to open log [FAILED]
root@HOST [~]# /etc/init.d/httpd restart
Stopping httpd: [FAILED]
Starting httpd: no listening sockets available, shutting down
Unable to open logs [FAILED]
root@HOST [~]# tail -n 10 /var/log/messages
Sep 29 17:59:30 localhost avahi-daemon[2870]: New relevant interface wlan0.IPv4 for mDNS.
Sep 29 17:59:30 localhost avahi-daemon[2870]: Joining mDNS multicast group on interface wlan0.IPv4 with address 196.219.240.236.
Sep 29 17:59:30 localhost avahi-daemon[2870]: Registering new address record for 196.219.240.236 on wlan0.
Sep 29 17:59:31 localhost avahi-daemon[2870]: New relevant interface wlan0.IPv6 for mDNS.
Sep 29 17:59:31 localhost avahi-daemon[2870]: Joining mDNS multicast group on interface wlan0.IPv6 with address fe80::223:cdff:fecb:9c5e.
Sep 29 17:59:31 localhost avahi-daemon[2870]: Registering new address record for fe80::223:cdff:fecb:9c5e on wlan0.
Sep 29 17:59:31 localhost NetworkManager: <info> (wlan0): device state change: 7 -> 8
Sep 29 17:59:31 localhost NetworkManager: <info> Policy set 'Sunsoft1' (wlan0) as default for routing and DNS.
Sep 29 17:59:31 localhost NetworkManager: <info> Activation (wlan0) successful, device activated.
Sep 29 17:59:31 localhost NetworkManager: <info> Activation (wlan0) Stage 5 of 5 (IP Configure Commit) complete.
What is the problem I have a local server
CentOS Linux

View 19 Replies View Related

Networking :: Sending Frames Of Size 1518 Using Raw Sockets

Aug 19, 2010

I wrote an application that receives packets on one interface and sends them to another interface after it added a vlan header. Both the sending and the receiving is done using raw sockets. Everything seems to work fine until I get TCP packets that are of size 1514 (MTU). Once I add a vlan header to the packet, its size becomes 1518 and when I try to send it I get the returned value -1 and errno=90 (message too long). I tried to change the MTU of the NIC to a value that is bigger than 1500 but that fails. If I create a bridge using brctl and vconfig between the NICs I can see that my NIC does sends packets of size 1518. What do I need to in order to make my NIC to send packets of size 1518?

View 5 Replies View Related

Networking :: Sending / Receiving Data Simultaneously Using BSD Sockets

Jun 25, 2010

I would like to send a data using one thread and receive a data using other thread by using a same socket connection using USD sockets. The calls i am using for sending and receiving are send(), recv(). let me know is it possible to send and receive the data parallel (Full duplex communication)?

View 2 Replies View Related

CentOS 5 Networking :: Active UNIX Domain Sockets Necessary To Use

Jun 28, 2009

Did a netstat -an got this

Active UNIX domain sockets (servers and established)

View 1 Replies View Related

Networking :: Detecting Broken Connection Before Sending Data With Sockets?

Oct 28, 2010

I am writing a code in Python where a socket client changes data with the server. That works nice if the connection is up. However it is also supposed to work offline. So I need to be able to detect if the connection is up before sending data, but I was not able to do so. A summary of the code is like that:

Code:
try:
socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
socket.connect( (self.host, self.port) )
connected = True
except:
connected = False

if connected:
data = "some data byte"
try:
socket.send(data)
except:
connected=False
socket.close()

If I unplug the cable after the connection is ready then the socket sends data and does not detect the connection failure. What is amazing is that the client detects the connection failure just after the cable has been plugged again. Of course there is a loop in the code above and always that connected==False a new connection is made. How could the program detect the connection failure before sending data and then lead the code to an exception?

View 3 Replies View Related

Networking :: Limitof UDP Sockets We Can Bind At Same Time In Fedora Core X64 ?

Jan 18, 2011

During the development of a java application appearantly found that cannot bind more than 500 UDP sockets at the same time.

The developed java application is running on Fedora Core (x64)

Is there some procedure to check how many sockets I can bind at the same time on that linux distribution?

In case the limit exists, can it be increased easily?

$ uname -a result is :

View 2 Replies View Related

Networking :: Packet Generation - Info On Sockets In Kernel Level?

Jul 14, 2011

I am learning about net filters and I am practicing some sample programs on it. I am very new to this and I have a general query. I got the packet to a desired function using PRE_ROUTING hook. Now how do I frame a packet from this point? I am just trying to simulate a echo client server program in the kernel level using these hooks. Any useful info on sockets in the kernel level?

View 1 Replies View Related

Programming :: PING Using Raw Sockets In C?

Nov 18, 2010

Is there any way to implement a simple ping script in C (unix)? I'm programming simple OpenWRT scripts.

I have found some examples of ping in C:

[URL]

However, nothing happens, nothing is sent.

When I look at the code, in the portion where the socket is created, I can see that the socket is not binding to any interface:

Code:
if ((sockfd = socket(AF_INET, SOCK_RAW, IPPROTO_ICMP)) == -1)
{
perror("socket");
exit(EXIT_FAILURE);
}
setsockopt(sockfd, IPPROTO_IP, IP_HDRINCL, &optval, sizeof(int));

Instead, it uses "setsockopt" to set some options.

My guess is that it is trying to send packets over the eth0 interface instead over the wl0 (wireless) interface (which is the one I want to use to send pings).

Now, my question is: Is there any other way to send pings in C by binding to an interface?

View 1 Replies View Related

OpenSUSE :: Grep Hangs On Sockets?

Jun 6, 2010

Here's a silly question: suppose I want to "grep" an entire directory. Real life example: we reconfigured our mail server to a different IP address, so I needed to search for each occurrence of the original to make sure they'd all been changed.

A simple

Code:
grep -i -l -r "192.168.1.200" *

... works great until it hits a socket. This particular mail server has sockets scattered at random through the directory. When grep hits one of these, it hangs.

I've tried every command line option I can think of it to force it to ignore these sockets, but to no avail. Any of you Grep Gurus out there want to give me a hand?

View 1 Replies View Related

Programming :: C/C++ - Program Detecting New Sockets

Jul 25, 2010

I need to create a C/C++ program in Linux that succeeds in detecting how many tcp-sockets and what tcp-sockets are created by the other processes in the system in a particular time interval (e.g., the interval time this application is running in). Then, I'd need to get some information like local/remote port number and local/remote ip address of each of these sockets.

View 8 Replies View Related

Programming :: How To Use Sockets To Display GUI At Server End

Aug 27, 2010

I am struggling a little on how to best approach this problem. I have wrote a server program that runs via xinetd, that obviously spits out data at the client end. Fairly straightforward stuff?There is a point in my server code where I need to display an image/gui i.e something that runs on X11 that prompts a user to perform a task on the display connected at the the server side.So far I have written a test program that displays some text at the client end and then launches the browser at the server end. I have also set the following export. Code: export DISPLAY=:0 and then goes on to launch my web browser. Works great when ran locally on the server and when I remotely telnet in to the server and run the code.

However when I try to run the same piece of code as a xinetd service the export seems to have zero affect and the client terminal window displays errors associated with there not being a X11 server running.The code launches fine when I create a socket to serverip:6556 it just the ability to display gui programs to another display that does not seem to be working.

View 5 Replies View Related

General :: Difference Between CPU Core And Sockets?

Mar 26, 2010

how to differentiate cores and sockets in CPU?

View 5 Replies View Related

General :: Using Netlink Sockets To Get MAC Address?

Jul 7, 2010

I am trying to retrieve an interface's MAC address using netlink address. I got to a point, where I am able to parse the reply for 'RTM_GETLINK' till 'case IFLA_ADDRESS'. After that, I have no idea to print the MAC address.

View 1 Replies View Related

Programming :: Send A Packet Through Sockets C++

Feb 1, 2011

Can someone help me with this problem,trying to send a packet,using tcp/ip,the packet should look like this:

Code:
field 1: SOCKS protocol version, 1 byte (0x05 for this version)
field 2: status, 1 byte:
0x00 = request granted
0x01 = general failure
0x02 = connection not allowed by ruleset
0x03 = network unreachable
0x04 = host unreachable
0x05 = connection refused by destination host
0x06 = TTL expired
0x07 = command not supported / protocol error
0x08 = address type not supported
field 3: reserved, must be 0x00
field 4: address type, 1 byte:
0x01 = IPv4 address
0x03 = Domain name
0x04 = IPv6 address
field 5: destination address of
4 bytes for IPv4 address
1 byte of name length followed by the name for Domain name
16 bytes for IPv6 address
field 6: network byte order port number, 2 bytes
and this is my code:

Code:
int domainLen = strlen(domain);
char reply[domainLen + 7];
reply[0] = 5; // version
reply[1] = 0; // succed
reply[2] = 0; // reserved
reply[3] = 3; // its a domain
reply[4] = domainLen;; // lenght of domain
for(int j = 0; j < domainLen; ++j)
{
reply[j + 5] = domain[j];
}
reply[5 + domainLen] = 80; // port
reply[20] = '�';
Send(reply, sizeof(reply));
domain is "www.google.com". Am I doing it right ? I dont know much about bits.

View 6 Replies View Related

CentOS 5 :: Epoll - Sockets And Threads ?

May 20, 2009

There is a transient bug in my code which I just can't catch.

The basic idea is this. I have a multithreaded server and two thread pools, the IO pool and Worker pool. The main server thread listens to incoming connections. When it gets one, it dispatches a thread from the IO pool to read the socket. An IO thread reads the socket. If there is data, it invokes a thread from the Worker pool. This thread then finishes off the processing including closing the socket. The code follows.

Before I show the code, let me tell you what's happening when I am testing it. I have a client program which has about 30 threads, each opening a separate socket connection with the server. Each sends a request which the server responds to. Sometimes I have all the threads finish in a zip. Sometimes both the client and the server hangs. And yet at other times, the client gets a connection refused message.

Now the code. I have omitted some of the nitty-gritties, including possibly variable declarations. I'll post them if it's required.

View 1 Replies View Related

Ubuntu :: Active UNIX Domain Sockets?

Jul 27, 2010

After my first installation/ version of Ubuntu 64, I performed a netstat and noticed I did NOT have any Active UNIX domain sockets as I do now. After doing some research, I found this is related to MYSQL and server services which I am in no need of running and nor do I want to run if not needed. So exactly what are these services used for, which app is creating this and why?

Is it possible to remove the app or processes if they are not needed? Killing these connections every time they attempt to establish would be rhetorical.

~$ uname -a
Linux panda 2.6.32-24-generic #38-Ubuntu SMP Mon Jul 5 09:20:59 UTC 2010 x86_64 GNU/Linux
:~$ netstat | more
Active Internet connections (w/o servers)

[Code].....

View 1 Replies View Related

Programming :: Parallel Data Transfer Using Sockets

Feb 25, 2011

I am doing a project where 2 clients connect to server and communicate (chat) and transfer data one after other using sockets. I have working code for this in C language. Now our main aim is to create a communication link where two clients transfer multiple streams data parallely. To be more precise i want to transfer images files and audio files parallel at same time, so is it possible to send data parallel using one socket connection?

View 3 Replies View Related

Red Hat / Fedora :: Unable To Connect To Windowsxp Sockets

Mar 14, 2010

I am using windowsxp in one pc and another running on fedora 11,,, i develop socket based applications which run on fedora linux. But i need to test these applications with a software running on windows xp. i found that i could not connect to socket of the application running on fedora from an application running on windows. i am not able to identify the problem. should i try any other linux distribution?

View 4 Replies View Related

General :: (Netstat -a Command) Why Some Sockets Do Not Have Path Name

Oct 15, 2010

When I run "netstat -a" commnand, it display:

Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node Path
unix 2 [ ACC ] STREAM LISTENING 20269 /tmp/.gdm_socket
...
unix 2 [ ] DGRAM 997161
unix 3 [ ] STREAM CONNECTED 942628 /tmp/.X11-unix/X0
unix 3 [ ] STREAM CONNECTED 942627
unix 3 [ ] STREAM CONNECTED 942626 /tmp/.X11-unix/X0 ....

Why some socket don't have Path name? And what mean's RefCnt = 2?

View 2 Replies View Related

General :: Setting Timeout Time For TCP Sockets?

Jun 8, 2011

I have written simple TCP server-client programs in 'C' on my RHEL 5 64 bit.I want to add SEND and RECEIVE timeout for this socket; so that if server is not responding in given time, request will get timeout instead of waiting in "recv" call.But I failed to do so.

View 6 Replies View Related

Server :: Apache Crash - No Listening Sockets Available

May 23, 2011

Code:
[Sun May 22 04:02:06 2011] [notice] SIGHUP received. Attempting to restart
(98) Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs

Above message is from /etc/httpd/logs/error_log.1. Saturday morning I reinstall my server. After finish, no error. I can access my HTTP server. Monday morning it has crashed. I don't know what is the meaning about this message.

View 2 Replies View Related

Software :: Api For Analyzing The Stock Market In C Using Bsd Sockets?

Jul 1, 2011

i was wondering how to get a api for analyzing the stock market or certain stocks from google finance and writing a database with a search alogorithm in c

View 2 Replies View Related

Programming :: Creating 2 Sockets In Client / Server?

Jun 9, 2010

I have a problem creating my second socket in client file. the program was running well but when I try to add another socket to connect to the same server, I got a problem connecting to the first socket! it doesn't make sense. the original code was:

sockfd[i] = socket(AF_INET, SOCK_STREAM, 0);
if(sockfd[i] < 0) error("(MAIN) - Error openning socket 1");
port_num[i] = portno;
bzero((char*) &serv_addr[i], sizeof(serv_addr[i]));

[Code].....

View 1 Replies View Related

Programming :: Read DNS Informaton Using Sockets And C Libraries

Jun 9, 2010

I am using the API libpcap in order to filter the traffic of the port 53 from my PC ro other PCs, in other words the DNS traffic.I want to get more information about the DNS traffic that is being sent to the DNS server, in other words the queries. So far I have no idea how to read the information data or payload of the UDP package in order to read the content of the traffic for example if there is any PTR, A, MX, etc Resource Record.According to the RFC 1053 there is a header that is possible to use in order to easily get this info.

View 5 Replies View Related

Programming :: Automated Monitoring Of Different Sockets For Available Data

Feb 4, 2011

NextPendingConnection () returns a new socket with respect to a new client. This new QSocket is passed to the connect () function which connects it to a SLOT 'xyz' with SIGNAL 'readyRead()'. Now in the SLOT 'xyz' how I am supposed to automate the monitoring of ALL connected sockets to see whether some data is available on them? One pathetic way would be to run all the sockets through a for loop and check each one of them for the data. Secondly, I read up on QSocketNotifier() here: [URL]. But I am not sure if that is the correct thing.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved