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
ADVERTISEMENT
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
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
Nov 29, 2010
I am coding a http server which has to send the file(s) such as images, .avi files, .mpeg, that the client is going to request. I have been trying of sending files through sockets.
char info [256];
bzero(info, 256);
//memset(&info,0,sizeof(info));
read(socket, info, 255);
write(socket, HTTP, 255);
FILE *fl= fopen(info,"rb");
fseek(fl, 0, SEEK_END);
long len = ftell(fl);
printf("largo: %ld", len);
unsigned char *ret = (char*) malloc(len);
fseek(fl, 0, SEEK_SET);
fread(ret, 1, len, fl);
However, it's supposed to be shown in Mozilla Firefox (as the client). But it is not doing it, so.. It's just not getting the complete file.
View 1 Replies
View Related
Oct 16, 2010
I'd like to edit a few frames from some videos, and then return them to the video stream for playback. What are the best tools to do this with?
I tried exporting a frame with Kino, editing with GIMP, and then re-inserting it into Kino, but Kino rejected the attempt.
Will Kino do this, or do I need to be using something else?
View 3 Replies
View Related
Oct 11, 2010
i want to connect two videos into one. let's take two videos from videos as an example. i want my final video to have the height = height of first video + height of second video and width = max(width of first video, width of second video). in the upper part the first video is played whereas in the lower part the second video is played.
do you know how to do it under linux, the best possibility while using mencoder, ffmpeg or any other command line command?
View 1 Replies
View Related
Sep 8, 2010
With Mellanox 10G NICs and the MTUs set from 1600 to 9000 we have tcp sessions hanging. Executing ls during an sftp session just hangs. The same thing happens for an ssh session, if execute ls I might get few item in the directory but then the session hangs. Like wise for FTP. The Fujitsu switch is configured by default to handle jumbo frames. At 1500 MTU everything works fine. We are running the 2.6.25.14 kernel with CentOS 5.2 and the Mellanox driver.
View 3 Replies
View Related
Oct 18, 2010
I am looking for a PCI Ethernet adapter which supports jumbo frames. The card I have now - Trendnet TEG_PCITXR - says it supports jumbo frames but it turns out the MTU is 7200 bytes. Yeah this is more than 1500, but it seems like a bit of a scam to me. Since it is nearly impossible to find these specs on product info pages, I was hoping someone could recommend a network card that is proven to support 9000 (or greater) MTU. Some more info, I am running Ubuntu 9.04, kernel 2.6.28-19
View 1 Replies
View Related
Jan 24, 2011
What's the total no. that the OS can create? Does this differ from 32-bit?
View 1 Replies
View Related
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
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
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
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
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
Jun 28, 2009
Did a netstat -an got this
Active UNIX domain sockets (servers and established)
View 1 Replies
View Related
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
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
Mar 28, 2010
finding out if jumbo frames are supported by linux or not?
View 1 Replies
View Related
Dec 15, 2008
I have installed qmail in centos 5 machine. After the installation , the qmail is not able send mails. The output of the qmailctl stat is
[root@testserver qmail]# qmailctl stat
/service/qmail-send: up (pid 28409) 168066 seconds
/service/qmail-send/log: up (pid 20217) 1 seconds
/service/qmail-smtpd: up (pid 20210) 2 seconds
[code]....
View 2 Replies
View Related
Jan 24, 2010
Sendmail will send letters OK, but they never show up. I cannot recieve with dovecot either. Everything seems to be OK, but it never works. I can send and recieve from localhost, but nothing outside.
The router is listening on 143, 110, and 25, and is forwarding just fine, or my site probably would not be visible.My HTTP site is at geekinsnthings.homelinux.org, the other address visible in the output is for anything else. THis is because geekinsnthings.homelinux.org redirects me to 8080 on my IP.
View 2 Replies
View Related
Sep 1, 2011
I am experiencing a problem with viewing 1080p movies. The frames get stuck and don't refresh, so I am left with a single image while the sound plays on fine. I find that this only occurs with high resolution movies, but I am curious as to where the problem lies and if I can fix this at all. Here are my computer's specs and configurations:
I am using Ubuntu 10.10 (didn't want to get 11.04) with 2GB or ram and 972.6MB of swap (I need to increase that to 4GB, I think? Correct me if I am wrong). I am using a Toshiba u400 Satellite which comes with a Intel X3100 Integrated Graphics chipset (don't really know the strength of this set up) and has two 1.73 GHz processors. The only thing that is within my power to change is the swap allocation. When I start the movie and bring up the System Monitor, VLC takes up almost the entire CPU usage.
View 1 Replies
View Related
Jun 19, 2010
Since I installed Ubuntu 9.10 recently and downloaded a new copy of MPlayer, a Shell execution of Mplayer of a video with the -fps switch, sees the -fps being ignored. The video in question plays the video too fast and goes out of synch with the audio. This has never been a problem as I play the video using the shell and include the -fps option to slow the video down. For instance, the command below would play the video at 30 fps:
mplayer -x 640 -y 480 -fps 30 "/media/USB2/williams.flv"
It has always worked before. What's changed in the latest mplayer, or is there something else I need to install in order to get -fps functionality? I can paste the (rather long) output mplayer gives upon execution of the above command.
View 2 Replies
View Related
May 23, 2009
I have a laptop (running Fedora 10 KDE version) and a desktop (running Ubuntu 7.10) on my home network. Is there any way to send messages from one computer to another through LAN ?
View 5 Replies
View Related
Dec 10, 2008
I am not a networking expert by any means (in fact I have never taken a networking course), but I have taken several security courses, and generally we wind up discussing replay attacks. For example, the Needham-Schroeder protocol (using symmetric-key cryptography anyway) is flawed because it allows for replay attacks, and I understand why.
I guess my question is actually how someone would perform a replay attack. I know I can sniff network traffic by downloading wireshark. I also have downloaded winpcap and npg on my WinXP virtual machine. I'm trying to use this guide to help me, but I'm quite lost:[URL]What I did was to post a "link" to my facebook profile and I sniffed the traffic using wireshark. What I would ultimately like to accomplish is to copy that packet out of the wireshark output, and then use a tool like npg to transfer the raw packet back to facebook, which should result in a second, redundant post. I just can't figure out how to do that.
I'm pretty sure this should be possible. Facebook only uses an SSL session for authentication during login. After that, the information is just sent in the clear, so I'm pretty sure this should be possible.Can anyone explain how to do such a thing? It would really help my research paper that I'm working on this semester if you can. As of right now the attack we are trying to demonstrate/defend against is using a Windows VM, which is why I'm using winpcap/npg. The attack is actually possible using just about any OS (depending on the exploit used), but our POC is Windows only at the moment
View 4 Replies
View Related
Jun 10, 2009
Suppose I have computer A with ip address on eth0 of 192.168.0.1 and ip address on eth1 of 192.168.1.1. If I send packets to 192.168.1.1 from computer A, it automatically uses the loopback interface. Is it possible to modify the routing table some how to send these packets out on eth0 instead and have them route around the network and come back on eth1.I've tried 'route add -host 192.168.1.1 dev eth0' but it seems to completely ignore this entry.
View 5 Replies
View Related
May 12, 2010
I have an issue when sending snmp traps. I have an embedded system connected to a SNMP manager. I am sending traps from the box to the manager continuosly. After sometime I don't see any trpas coming out.
I get this error message.
Cannot open file /proc/net/tcp ...
: Too many open files
Cannot open file /proc/net/snmp ...
: Too many open files
What could be the reason for such an error?
View 1 Replies
View Related
Apr 6, 2010
I'm hosting a Sendmail Cyrus-Imap server on fedora 12. I recently installed a second NIC on a second internet gateway and successfully configured source based routing. Clients are able to connect over the mail.domain.com received from the gateway 192.168.0.1 to the interface 192.168.0.254. ETH0. Clients are also able to connect from pop3.domain.com and smtp.domain.com from the second gateway 192.168.1.1 to the interface 192.168.1.254. ETH1
I have cyrus-imap certs configured for the mail.domain.com and a Sendmial cert configured for mail.domain.com. My question is how would I tell sendmail and cyrus that the mail.domain.com goes out the ETH0 but deliver the second and third cert (eg cyrus sends pop3.domain.com and sendmail sends smtp.domain.com) to clients connected on ETH1?
View 1 Replies
View Related
Apr 28, 2011
I have created this thread as it sis realy hard for me to send traps from my Linux workstation... I m lost with v1/v2/v3 snmp... So here is the initial configuration: (without traps)
rocommunity myrocom
rwcommunity MyL33tP4ss 10.5.32.202
rwcommunity MyL33tP4ss 127.0.0.1
syslocation "FR"
syscontact root
From there i can "poll" my system. But what should i do if i want my Linux system sending traps when disks are full or system overloaded etc...I have found information on Internet but not easily understandable It is for v3:
rwuser admin
createUser admin MD5 mypasword
#
# From there i would have to comment the lines regarding the communities
#
[code]....
10.5.32.202 is my management host ... is this config ok ? But it seems that trap2sink is for v2 ? How does it work ?
View 4 Replies
View Related
Aug 10, 2010
Why would the frames and buttons disappear after a regular update. I rebooted which took back the buttons I was missing from the top=right corner of the windows but, the frames are still missing? I am using a combination of Compiz and Metacity and until now all has been working really well. I don't even have the awful window resize delay I was having.
View 3 Replies
View Related
Jun 12, 2011
Can anyone hint a program suitable for separating individual frames from a video stream?
View 2 Replies
View Related