Networking :: How To Avoid Loopbacking For UDP Socket

Aug 26, 2010

I am facing some problem with loopback on UDP sockets. is there anyway by with we could avoid loopbacking of a UDP datagram destined to same IP address, and instead force it to go all the way till NIC and then come back to the socket.

The problem is, we have some piece of code written at driver level, and we want each and every packet to hit that code on its TX and RX path. But if src and dest IPs are same, packet loops back from the IP stack itself, without hitting the driver code.

Can we modify the characteristics of a UDP socket, such that each and every packet has to go through NIC interface, thus avoiding loop backing when the src and dest IPs are same?

View 1 Replies


ADVERTISEMENT

Networking :: Configuring Socket Timer To Release Socket Once The Connection Is Terminated?

Jun 4, 2010

I want to configure socket timer to release socket(port) once the connection is terminated. Do we have something in Linux OS to configure this delay to release socket?.

Any command, link or man-page anything will be helpful.

I browsed a lot but unable to find it.

View 1 Replies View Related

Networking :: /usr/sbin/in.telnetd: Getpeername: Socket Operation On Non-socket?

May 5, 2009

I had installed Fedora 10

Below is the output of uname -a

Linux 2.6.27.5-117.fc10.i686.PAE #1 SMP Tue Nov 18 12:08:10 EST 2008 i686 i686 i386 GNU/Linux

I need to enable telnet service on it, then found xinetd and telnet-server not installed,

Then I had installed below
First I had installed Xinetd: xinetd-2.3.14-21.fc10.i386.rpm
then I had installed telnet-server: xinetd-2.3.14-21.fc10.i386.rpm

After installation I executed below commands

Service xinetd start
Chkconfig xinetd on
Chkconfig telnet on
Service iptables stop
Chkconfig iptables off
Iptables �F

After I had tried telnet localhost ----IT FAILED

when I run telnet server manually by issuing the below command
/usr/sbin/in.telnetd, I get below error
[COLOR="Red"]/usr/sbin/in.telnetd: getpeername: Socket operation on non-socket[/COLOR]

I have other system running same OS, I had followed the same steps discussed above to enable telnet, It works fine on it.

View 1 Replies View Related

Networking :: Multiple FTP Upload Socket Error "Connection Reset By Peer: Socket Write"

Jan 31, 2010

I am pragmatically trying to upload a list of files from my client machine to a proFTPd server I have running on Ubuntu. Every time I get several (around fifty) files into the transfer, I get the following error: Quote: Connection reset by peer: socket write error

I am able to remotely upload 25,000 small files of ~ 1K in size, but when I go to upload hundreds of 2-4 Mb files, I get a socket write error. Am I using up all available sockets before they can be released? If so, how do I release the sockets? If not, what does this error mean and why am I getting it?

View 1 Replies View Related

Server :: Socket Connections / Socket And TCP Connection For Connecting To An External System?

Dec 7, 2010

Anyone knows the difference between a socket and TCP connection for connecting to an external system?

View 1 Replies View Related

General :: Socket Programming - Feed Some Words One By One To The Socket

Jul 6, 2010

i'm writing a simple program of client socket program. Here below is the code sample which i'm writing...

Code:
//tcp_client.c
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netdb.h>
#include<string.h>
#include<stdlib.h>
[Code].....

the above code works fine.if we copmile and run ./a.exe 192.xx.xx.xxx 1111 and press enter it works fine..everytime it asks "Please enter the message: " and if give that will be displayed in server. but my problem is i dont want to print everytime "Please enter the message: " i just want to feed some words one by one to the socket.

View 4 Replies View Related

Programming :: Setsockopt : Socket Operation On Non-socket Getting Error?

Mar 30, 2009

im getting that error in my code for some reason. I compiled my code, and when i try to run this server it throws me an error on my call to setsocketopt(). The only way it can reach that part of my loop is if it succeeds when it calls sock() so I dont understand why the error says its an operation on a non-socket. Im just trying to set up a server to pass messages from a client to it a viceversa. Here is the code:

Code:
int main()
{
int socket_fd, new_socket_fd, k;
struct addrinfo hints, *server_info, *p;
struct sockaddr_storage peer_address;
code....

View 7 Replies View Related

Networking :: Avoid DNS Cache Flush- Reboot?

Oct 21, 2010

store the dns cache over the reboot in linux(which should not flush the dns cache on reboot).

View 2 Replies View Related

General :: Socket Error / Socket 31: 0x36?

Sep 15, 2009

We are seeing recv err on socket 31: 0x36. What could be meaning of the error?.

View 1 Replies View Related

Ubuntu Networking :: Want To Avoid Disaster That Happened To Kostolnik

Jul 19, 2011

According to this scary wi-fie hacking article:
- http://www.cnn.com/2011/TECH/web/07/...ntenced.wired/

A neighbor was sent to jail for 18 years for seriously hacking his neighbor:
- http://www.wired.com/images_blogs/th...encingmemo.pdf

What can we install on Ubuntu to forestall such an occurrence at home (given a WRT54G router & 1 Ubuntu computer)?

View 3 Replies View Related

Ubuntu Networking :: Ad-hoc Network Doesn't Survive A Reboot / Avoid Having To Bring Down And Up Interface?

Mar 1, 2011

I'm configuring an HP Mini 110 (wireless BCM4313) to use it as a small Access Point (ad-hoc mode).

I want to make my configuration reboot friendly. With what I have right now, as soon as I reboot the laptop, the wireless interface configuration isn't correctly setup. I have to do "ifdown eth1; ifup eth1" manually.

Here is what I have in /etc/network/interfaces for the wireless interface code...

So the question is how can I avoid having to bring down and up the interface?

View 1 Replies View Related

Networking :: TCP And UDP Socket On Same Port ?

Nov 20, 2009

Can we open TCP and UDP socket on same port number?

View 1 Replies View Related

Networking :: Create The IPV6 Socket

Mar 14, 2010

I am trying to create the IPV6 socket and was wondering if anybody has any code strip which I can reuse ?

View 1 Replies View Related

Networking :: Reusing Socket Without Closing It?

Oct 22, 2010

I want to reuse a socket without closing the same. I am running a client and it connects to a server. The server shuts down in between and comes up. So after this I want to reconnect to server without closing my socket and creating another one. Is there any way?

View 3 Replies View Related

Networking :: Send Array Over Socket

Nov 20, 2008

how can i send an array of string to the client from the server side?

View 2 Replies View Related

Programming :: Socket Programming - Detect Whether A Client Socket Is Closed / Active?

Mar 8, 2011

iam just trying to connect to server which accepts one client and server will read(blocking operation) infinitely, but After closing the client socket the server "read operation" is returning zero and "errno variable(in errno.h)" value is also zero. how can i detect whether a client socket is closed/active..?

client.c
Serv_Addr.sin_family = AF_INET;
Serv_Addr.sin_addr.s_addr = inet_addr("127.0.0.1");
Serv_Addr.sin_port = htons(26553);
if( 0 > connect (Serv_Fds,&Serv_Addr,sizeof(Serv_Addr)) )
{
perror("connect");
return 0;
[Code]....

View 3 Replies View Related

Ubuntu Networking :: Windows Socket Connection ?

Mar 17, 2010

I am trying to connect with Winsock Windows sockets from a PC running Windows XP with a utility program that enables a dialogue over sockets. I have the listener running on Ubuntu on Port 6330. I can telnet to the listener and interact from both the Ubuntu desktop and the XP PC. But my utility program using Winsock is unable to connect. I have no firewalls impeding this. Maybe there is a better vehicle than the Windows Winsock.dll? I dont need network file access, just TCP ports/.sockets.

View 1 Replies View Related

Networking :: Enable The Option Of Keep-alives On A TCP Socket?

Apr 18, 2010

Have a question regarding the implementation of TCP keep alives.

If I enable the option of keep-alives on a TCP socket, is there any way that my application can get the response to the keep-alive back from the kernel. Basically, I have a 'select' blocking on a socket on which I have enabled keep-alives. I need to know if select would unblock if a response to a keep-alive sent by the kernel is received on the socket.

View 3 Replies View Related

Networking :: Connect To A Remote Machine Using Tcp Socket?

Mar 2, 2010

#server.pl
use IO::Socket;
$| = 1;
$socket = new IO::Socket::INET (
LocalHost => '10.100.207.13',
LocalPort => '5000',
code....

it displays the message "couldn't connect to the server". How can i connect to the remote machine using tcp socket?

View 3 Replies View Related

Networking :: Can't Bind Send Socket: Address Already In Use

Feb 23, 2009

I am currently trying to get a B.A.T.M.A.N mesh network up and running. the thing uses UDP port 4305 for broadcasting to nearby nodes and it seems this port is closed or used by something else.

now i have tried to open this port with commands like

Code:

iptables -A INPUT -p udp --dport 4305 -j ACCEPT
iptables -A OUTPUT -p udp --dport 4305 -j ACCEPT

it still gives me the same error saying the socket cannot connect.any way for me to scan that udp port, see what is blocking it and open the thing up ?

View 4 Replies View Related

Networking :: Mysql Cannot Connect Socket But Fine Through TCP/IP?

Jul 29, 2010

I'm using mysql server through tcp/ip with no problem. But I don't know since when I'm not able to connect through socket. There are lots of topics but my bad I couldn't find one works for me.

OS: Ubuntu 9.04
mysql 5.0.75-0ubuntu10.5

my.cnf

Quote:

[mysqld]
user = mysql
socket = /var/run/mysqld/mysqld.sock
skip-name-resolve
safe-show-database
code....

/var/run/mysqld/mysqld.sock socket exists and has chmod 777
Error:

Code:
ERROR 2002 (HY000): Can't connect to local MySQL server through socket 'localhost' (2)

View 3 Replies View Related

Networking :: Raw SCTP Socket Cannot Bind With Port?

Jul 26, 2010

If I open a raw SCTP socket, am I able to bind to a specific port? (I only want to see SCTP packets from a particular IP address AND port.) Or, any raw SCTP socket, regardless of port binding , will get all SCTP packets received by the OS from that IP address? The port doesn't matter and is ignored.

View 1 Replies View Related

Networking :: Socket Timeout Happening Despite Data Being Available?

Dec 29, 2010

I am using select to read the data from socket. on a load of 25 req per second, for some req i am getting the timeout in select (returning zero), but i am able to see the data on TCP using wireshark. kindly suggest what could be the possible reasons.

View 5 Replies View Related

Networking :: Unable To Close SCTP Socket

Jun 16, 2011

I create SCTP socket with port number 60011. The SCTP socket descriptor value is 18.
When I try to close the socket with the socket descriptor, sometimes it is not closed without errno.

View 2 Replies View Related

Networking :: Unable To Open Socket (Not Available Error)

Aug 12, 2010

I've been tasked with transferring a Python web server from a Debian box to a Fedora server for work. (I think) I've been able to transfer all required files but I'm unable to run the web server because whenever I make the HTTPServer call in the python file I get an error "Cannot assign Requested Address".

I've basically traced the issue back to the server being unable to open a socket on the requested port (8085 in this case). I've checked netstat and there are no processes running on that port (or any other one I've tried for that matter) so wondering if there's a system configuration I need to do to allow programs to bind to sockets. Is there a deny configuration set up somewhere I need to modify? Does this even make sense?

View 1 Replies View Related

CentOS 5 Networking :: Max Socket Connexion On A Server?

Jan 8, 2009

I used this Tutorial, to create a php chat daemon. But now I'm getting to the point where i've reach the max socket connexion on my centOs box... I have to much users. Which is 120. when there's more then that number of users in the chat .. things start to get messy. I have tried to change the SOMAXCONN kernel variable without success. I'm sure there is a solution to boost the number of user my chat can handle... (My server is dedicated to the chat).

View 2 Replies View Related

Fedora Networking :: Java Socket Listener Not Working?

Sep 26, 2010

I have forwarded both port 22 and 9000 on my router. I can connect on 22 and remotely login into the machine. The problem when I start my java listener program which is listening on 9000 it cant not establish any connection. I have even add this into the iptables too -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 9000 -j ACCEPT. I have disabled the SELINUX too. What else must I do to make it work any suggestion please?

View 6 Replies View Related

Networking :: Kill/disconnect Unix Domain Socket?

Jan 5, 2010

I have described my issue in detail here: [URL] basically, I am having a mysql server which keeps piling up on it's unix domain socket connections.

here's a small example of netstat as it looks now (count about 80-100 connections paired with httpd):

Code:
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node PID/Program name Path
unix 2 [ ACC ] STREAM LISTENING 3521428 12429/mysqld /tmp/mysql.sock

[Code].....

This is indeed a mysql server issue as far as I managed to debug it but until a workaround/fix is found I need to have my server responsive and the first idea that comes to my mind is to somehow kill those stray connections. as described in the mysql topic mentioend above, killing from mysql will not work. I need to kill them from outside mysql. I have setup a crontab script to kill and restart the mysql server when it cannot connect and it runs every 5 min. however this only lead to mysql being down sooner rather than later because in many cases just kill -9 and then service start mysql does not do the job (it's either part of the same issue of mysql or another issue). basically I need to manually kill mysqld instances a bunch of times until it's ok, OR, if that doesn't work, stop everything that is using mysql, wait a few minutes, and then start mysql. so I ditched that script and now I am manually restarting mysql server every ~ 24 hours.

so basically it's a pain. if I were to kill the stray connections however, I will not have to bother every day with restarting mysql.

View 2 Replies View Related

Networking :: Close A Kernel Module Network Socket?

Feb 10, 2010

I opened a socket with sock_create()... bind() listen() accept().

Then, the far end closes the connection.

I want to close the near end, so I can re-open for the next connection.

But there is no close(), and sock_release() crashes the kernel.

View 2 Replies View Related

Networking :: Discard The Duplicate Packet While Reading From Socket?

Feb 18, 2011

I am writing a client program which will read an XML file from the server. The issue I am facing is :

1) The client is able to read the complete file but in the end it also receives a duplicate packet which is actually a part of the same(XML) file.

2) I dont want this packet but how can I be sure that this is a duplicate packet and discard it?

3) Why I am getting this packet?

Output example:

suppose this is the file at server to read :

Code:
<root>
<classes>
<class1>CLASS1</class1>
<class2>CLASS2</class2>

[Code]....

View 1 Replies View Related







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