Networking :: Create A PF_PACKET Socket And Send A Frame To Another Host?

Nov 10, 2010

I'm trying to create a PF_PACKET socket and send a frame to another host, I know the destination's mac address and interface index, and I want to use my own protocol no., so I defined a PROTONO as 0x2323, here's the code of sender

Code:
#define MYPTNO 0x2323
int main(int argc, char **argv)
{
intsockfd;
//struct sockaddr_inservaddr;
struct sockaddr_ll servaddr, bindaddr;

[Code]...

View 1 Replies


ADVERTISEMENT

Programming :: Bind A PF_PACKET Socket To A Specific Port Number?

Sep 26, 2010

I am trying to create a socket to listen for a bootp response so I am using a PF_PACKET socket so that I get the response based on my mac. My problem is that I don't want to hear all traffic (as I do now) so would like to use a specific port number and bind to it.

View 1 Replies View Related

OpenSUSE :: Traceroute Broken In 11.4 - Unable To Create ICMP Send Socket: Permission Denied?

Apr 5, 2011

Code: # traceroute -I 69.12.32.2 Note: the -i and -I options were exchangedfor compability with LBL traceroute Use -I for ICMP, and -i <ifname> to specify the interface name unable to create ICMP send socket: Permission denied Note that the command was done as root. This worked in 11.3.

And yes, it works without the "-I". But it should work with the "-I". One shouldn't have to boot into Windows, just to run "tracert" there.

View 9 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

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 :: Using A Perl Script To Test For A Socket Listening On A UDP Port On A Remote Host?

Mar 10, 2011

is it possible using a perl script to test for a socket listening on a UDP port on a remote host ?I work in an environment where netcat is not allowed and from time to time I need to see if a UDP port is open on a remote host.

View 6 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

CentOS 5 Networking :: Error: Unable To Create Socket - Permission Denied

May 21, 2009

I have a cgi script that tries to get the IP address of a domain. the Domain is defined in Bind, yet it can not resolve it. I put the domain in the host file and it then gives a Error: unable to create socket - Permission denied

I figure I have to do some code changes to the script but here I would like an explaination as to the error I am getting.

View 1 Replies View Related

Networking :: When The Server Send An Email - Error No Route To Host Appear

Jul 29, 2009

I have 2 clients (one IP 200.x.y.52 and another 200.x.y.47) in ADSL conection and a same gateway (200.x.y.1).

When the server send an email, the error "No route to host" appear. I used TELNET 200.x.y.52 25 (110 soo) and the error occurr in both servers and both directions. The Firewall was disabled .

View 3 Replies View Related

Programming :: Send A UDP Msg Across A Socket?

Jan 24, 2011

Has anyone had an issue with gdb not being able to send a UDP msg across a socket?

I have ComponentA sending a msg to ComponentB utilizing gdb. ComponentB gets the msg. ComponentB sends a msg to ComponentC. ComponentC does stuff to the msg and sends a msg back to ComponentB using gdb.
ComponentB never seems to receive the 2nd message.

If I don't use gdb the messages Tx and Rx without an issue.

I'm flying blind without gdb to figure out a different bug.

View 3 Replies View Related

Networking :: How To Create A Host Name

Jan 24, 2010

I have installed NXServer from NOMachine and I want to connect to my home computer from work. Because the router at my house is dynamic as is the wireless to this computer how do i go about setting up a host name for one of these computers? I am running the latest debian. I also intend to use this computer eventually as a file and web server so this would be extremely benificial

View 2 Replies View Related

Programming :: Non Blocking Socket Send

Mar 7, 2011

Been trying all sorts of different things to implement a non-blocking send on a TCP server socket.As I kill the client, the server keeps blocking on the send no matter what. Am I missing something? Any other way to do that without involving any additional thread?

View 4 Replies View Related

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

Programming :: Send Text File Over Socket

Nov 20, 2008

how can i send a text file from server to client? the problem is, i dont know how to send those two file to the client ( center node)

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

Software :: What Is Maximum Number Of Bytes Is Possible To Send From Udp Socket?

Oct 1, 2010

I am created one udp socket. i want to send the data(bytes) to another PC.i need to send 614400 bytes of data. while sending it saying error like" message is too long ". so what is the maximum possible data can i send from a socket?

View 3 Replies View Related

Programming :: Socket C++ / Send And Receive Messages In Server?

Jan 2, 2009

I'm trying implement a small server for a university work, my server is creating, binding and listening but it don't accept any connection, these are the files I'm using in server:

Code:

// Definition of the Socket class
#ifndef SOCKET_H
#define SOCKET_H
#include <sys/types.h>
code....

I've made a client just for test it, but no ones run well, the server is always returning -1 when accept is called!!

What should I do to send and receive messages in this server??

View 3 Replies View Related

Ubuntu Networking :: Interhack And Error "Can't Access() Script - Could Not Create Socket: Connection Refused"

Feb 12, 2010

I'm trying to run Interhack (spoiled variant of Nethack) for local game. Is looking through settings I saw that:

[Code]....

When I try to start it with ih_server option it gives me that error: Code: Can't access() script Could not create socket: Connection refused I think my problem is closed port: Code: nc localhost 9999 localhost [127.0.0.1] 9999 (?) : Connection refused How do I fix this?

View 2 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

Programming :: How To Create Raw Socket With Non Root User Successfully?

Jun 30, 2011

I am writing a ping kind of program for my own application. This application needs to run with non root user privileges. This needs me to create a raw socket. But the ping connection is failing because of creating raw socket with non root user.How can I run the application successfully with non root user privileges using raw socket creation?

View 4 Replies View Related

Debian :: Send A Message To Another Host?

Dec 8, 2010

I have been trying to send some messages from my Debian GNU/Linux to my Canaima GNU/Linux, i have tried with write: write user@host

But it says user is not logged in, apparently the write daemon have to be running in both machines to do this.

And i wanted to use talk, but i should install it in both machines ¿?

The thing is that i have like 10 machines i wanted to send messages to, but i cant find an easy way to do this.

Is there any other way i am missing? or it has to be the "hard" way

View 1 Replies View Related

Ubuntu :: Failed To Create UDP Socket (SIP) On Port 5060 Address

Mar 13, 2010

I can't seem to get on my Twinkle SIP Phone, it says: "Failed to create a UDP Socket (SIP) on port 5060 Address already in use" after that message it brings me back to the window were I'm supposed to run my profile, how do I fix this?

View 6 Replies View Related

Ubuntu :: Android And Chrooted - Mysqld Can't Create Ip Socket Permission Denied

Sep 1, 2011

I have a droid phone, and I have ubuntu 9 running on it. This is done by chrooting since the phone runs a linux kernel. And it works... I have a question though. tightvncserver does work, and its able to listen on 127.0.0.1.. Its how you view your X session. So you chroot to Ubuntu, then start vncserver. Then switch back to android and login to ubuntu via vnc client. but apache, mysql, and postgresql do not work. Well. They dont seem too.. except for mysql. Mysql will start but only if you tell it not to use networking by saying skip-networking in my.cnf

Mysql says: mysqld cant create ip socket permission denied Apache2 says it can find 127.0.0.1 but doesnt actually run same with postgresql... All seem to be compiled with arm architecture. So why does tightvncwork? Why is it so special? How can it listen on the loop back (127.0.0.1) when nothing else can...

I have /proc and /dev bind to the chroot side. I can run ifconfig okay, and I can run /etc/init.d/networking start okay.. But apache2, mysql, etc have problems binding. I have removed apparmor even though technically its not running, but I removed it and its configuration files, just because I thought perhaps mysql looks at apparmor, but I doubted it.

View 1 Replies View Related

Server :: Configure Sendmail As Send-only Sever For Web Host

Feb 21, 2010

I am trying to set up sendmail on my intranet (home) webserver, so that it will send mail via my ISP. I have searched for similar threads including this thread, but the responses do not seem to have solved the problem. All I want is to call sendmail from Perl, to post myself the responses to a test form I am building, using my normal internet mail address. I do not want to receive or relay mail from any host except the web server itself (127.0.0.1).

I have edited sendmail.mc to define SMART_HOST as my isp's mail server and MASQUERADE_AS to be my local network name (which is not a registered domain - it is just the name I have given my home intranet). I have run make and built a fresh sendmail.cf, then restarted sendmail.

Using my form, I am able to submit the message to sendmail, but after 40 seconds the mail log shows a message

Code:

View 9 Replies View Related

Server :: Cant Send Mail Outs - No Route To Host

Jul 29, 2010

I cant send mail outs. I'm receiving

Quote:

When try send mails from pop3/imap or directly "root]#mail some@domain.com" but I CAN send mails to domains created in the server.

I stopped Iptables and still the error. The server is a common WHM/Cpanel installation with Centos 5.

Connection closed.

View 1 Replies View Related

Fedora Servers :: Getting Error Message When Trying To Connect To Vncserver 'unable Connect To Socket: No Route To Host (113)'

Apr 26, 2011

I install and configure the vncserver following and reading 1000papers, but all of this present the same problem; when i try to connect to my vncserver,recive this mesage: unable connect to socket: No route to host (113) The OS version is Fedora Core 14 and tigervnc-server i try different solutions including:Allow TCP connection modifing files /etc/gdm/custom.conf and /usr/share/gdm/gdm.chemas Disable SELinux removing iptables Here follow the vncserver configuration:

[code].....

The ip address of the vncserver is correct because i can do ssh on it. Where or what can i do?

View 4 Replies View Related

Programming :: Perl - UDP Server Receive / Send Packet To Host

Apr 1, 2010

I have found many examples out on the www for creating udp servers with sockets. The problem I am running into is after I receive the packet from a host I need to be able to send a custom made packet(I'm using RawIP / NetPacket to make my packet) back to this host. The only way to do this is seemingly through the send() function. This function however doesn't appear to allow me to specify which host to send my packet to.

View 2 Replies View Related

Programming :: Send File Through Raw Socket Using C Programming

Jul 23, 2010

I am currently doing a research on video transmission over wireless LAN. I tend to transmit my offline file (xx.svc) from server to client.It may sound stupid (since I have a very little knowledge about c programming and raw socket), but my biggest challenges is that when I want to write the file to the buffer, how actually to define/include the file at the programming coding? where I need to locate the file? Is it at the same folder with my c programming, or somewhere in the linuxinclude folder?

Can anyone just give a simple example on how to include a file and write it into a buffer before send it through raw socket.

View 14 Replies View Related

Programming :: Socket Programming Send File

Jun 22, 2009

this is my client and server. I can receive text file. but I can't send other type of file like PDF,Docx,Odt

View 11 Replies View Related

Server :: Plesk 9 - Send Domain Mail To Offsite / External Host

Apr 26, 2010

I am managing a Fedora dedicated server with Plesk 9 and just recently moved the email for one of the domains on the server to Google Apps for business. Unfortunately, I cannot get email messages from the website forms to deliver to addresses on this domain. For anyone familiar with Plesk, I have disabled mail in the hosting settings by un-checking the "Activate mail service on domain" checkbox and there are no accounts in the domain. (Other readings have indicated that this should be enough to allow mail to be directed to the appropriate server). My MX records correctly point to the google apps mail server.

I'm quite comfortable with command line, but I know almost nothing about the sendmail program or its alternatives and my attempts at researching how to set up this relay has been futile. I'm pretty sure I'm using sendmail and not qmail or anything else from what the red-hat style "alternatives" symlinks point to. I've also checked the /etc/mail/access, domaintable, mailertable, sendmail.cf, virtusertable, local-host-names, sendmail.cf, and submit.cf and most of these files are empty (except the .cf files), and the sendmail.cf and submit.cf make no reference to the domain in question.

Here is the output from a sendmail test that was was not received. (Private data omitted of course).
sendmail -v xxx@yyy.com
test email from yyy.com webserver. please ignore.
xxx@yyy.com... Connecting to [127.0.0.1] via relay...
220 my.server.com ESMTP
>>> EHLO my.server.com
250-my.server.com .....
Closing connection to [127.0.0.1]
>>> QUIT

Performing the same test and sending an email to a non-hosted domain works fine.

View 12 Replies View Related







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