Programming :: UDP File Transfer Error?
Apr 28, 2011
I have an assigment to create UDP file transfer with checksum,but currently i have a problem in transferring the data. The problem is:A.I sent a text file that have approximately 200kb but in the client receive only 100kb... is it fair?B.For text file,I track the result and i found that its okay for the text file. Write counter show 1024 byte every packet i sent. But when i sent mp3 file or pdf file it doenst show like this. For mp3 the data sent every packet i sent is gradually decreased from 1024 byte 1020byte contiounusly.... For pdf data its seems random.
View 6 Replies
ADVERTISEMENT
Mar 10, 2010
i am trying to transfer a file from my live linux machine to remote linux machine it is a mail server and single .tar.gz file include all data. but during transfer it stop working. how can i work and trouble shooot the matter. is there any better way then this to transfer huge 14 gb file over network,vpn,wan transfer. the speed is 1mbps,rest of the file it copy it.
rsync -avz --stats bkup_1.tar.gz root@10.1.1.22:/var/opt/bkup
[root@sa1 logs_os_backup]# less remote.log
Wed Mar 10 09:12:01 AST 2010
building file list ... done
bkup_1.tar.gz
deflate on token returned 0 (87164 bytes left)
rsync error: error in rsync protocol data stream (code 12) at token.c(274)
building file list ... done
code....
View 1 Replies
View Related
Oct 27, 2010
I need to create a program that has both a server and a client and can transmit PDF and text files between the two using UDP as the underlying carrier while behaving as if it is TCP. We have successfully created a UDP program that can simply transmit strings, but we are not really sure on how to transform this code to do files. We know that we need to use a buffer of some sort to transmit the file in pieces.
Code:
//dg_cli.c
#include "unp.h"
#include "sys/socket.h"
#include "string.h"
#include "stdio.h"
#include "stdlib.h"
#include "arpa/inet.h"
#include "netdb.h"
#include "sys/file.h"
#include "sys/types.h"
void dg_cli(FILE *fp, int sockfd, const SA *pservaddr, so
{ int n;
char sendline[MAXLINE], recvline[MAXLINE + 1];
while (fgets(sendline, MAXLINE, fp) != NULL) {
sendto(sockfd, sendline, strlen(sendline), 0, pse
n = recvfrom(sockfd, recvline, MAXLINE, 0, NULL,
recvline[n] = 0; /* null terminate */
fputs(recvline, stdout); } }
Code:
//dg_echo.c
#include "unp.h"
#include "sys/socket.h"
#include "string.h"
#include "stdio.h"
#include "stdlib.h"
#include "arpa/inet.h"
#include "netdb.h"
#include "sys/file.h"
void dg_echo(int sockfd, SA *pcliaddr, socklen_t clilen)
{ int n;
socklen_t len;
char mesg[MAXLINE];
for ( ; ; ) {
len = clilen;
n = recvfrom(sockfd, mesg, MAXLINE, 0, pcliaddr, &len);
sendto(sockfd, mesg, n, 0, pcliaddr, len); } }
Code:
//udpcli01.c
#include "unp.h"
#include "sys/socket.h"
#include "string.h"
#include "stdio.h"
#include "stdlib.h"
#include "arpa/inet.h"
#include "netdb.h"
int
main(int argc, char **argv)
{ int sockfd;
struct sockaddr_in servaddr;
if (argc != 2) {
fputs("usage: udpcli <IPaddress>", stderr);
exit(0);
} bzero(&servaddr, sizeof(servaddr));
servaddr.sin_family = AF_INET;
servaddr.sin_port = htons(SERV_PORT);
inet_pton(AF_INET, argv[1], &servaddr.sin_addr);
sockfd = socket(AF_INET, SOCK_DGRAM, 0);
dg_cli(stdin, sockfd, (SA *) &servaddr, sizeof(servaddr));
exit(0);
}
Code:
//udpserv01.c
#include "unp.h"
#include "sys/socket.h"
#include "string.h"
#include "stdio.h"
#include "stdlib.h"
#include "arpa/inet.h"
#include "netdb.h"
int
main(int argc, char **argv)
{ int sockfd;
struct sockaddr_in servaddr, cliaddr;
sockfd = socket(AF_INET, SOCK_DGRAM, 0);
bzero(&servaddr, sizeof(servaddr));
servaddr.sin_family = AF_INET;
servaddr.sin_addr.s_addr = htonl(INADDR_ANY);
servaddr.sin_port = htons(SERV_PORT);
bind(sockfd, (SA *) &servaddr, sizeof(servaddr));
dg_echo(sockfd, (SA *) &cliaddr, sizeof(cliaddr));
}
Code:
//unp.h
#include "sys/socket.h"
#include <stdio.h>
#define MAXLINE 4096
/* max text line length */
#define SERV_PORT 9877
#define SA struct sockaddr
void dg_cli(FILE *, int, const SA *, socklen_t);
void dg_echo(int, SA *, socklen_t);
View 1 Replies
View Related
Feb 24, 2011
I have two questions. 1- How can I set up FTP server for the first time on the Centos? 2-I want to give the ftp user full root access in the directory of /var/www/html so he would be able to upload or download files and folders without getting "FTP Critical file transfer error". From command prompt how can I give the user test root access in the /var/www/html with all the folders, sub folders and files in one shut?
View 9 Replies
View Related
Jan 1, 2010
Having a bit of a issue with Debian Squeeze and transferring files to the Sony PSP..Hook up PSP to USB port and Debian mounts it..I go to drag a 125 meg mp4 to video folder..Copy windows takes about 10 seconds to transfer it..Exit USB mode and there is no video there. Go back into USB mode and look at video folder on the PSP memory stick and there is no video..It vanished. From another after copy progress closed I right clicked PSP and unmounted it..
It error-ed saying device was busy and could not unmount..Looking at light on PSP i see memory stick is still being written to..i wait for light to stop flashing..About a minute or so..Then am able to unmount it..Go to PSP video and theres the video ready to be watched. Debian isnt accurately showing the copy progress...Its showing complete when it isnt..I have to watch the light on PSP to know when it is truly finished.
View 3 Replies
View Related
May 15, 2010
I have a problem with uploading any file to my Suse 11.1 with vsftpd. The active (not commented out) settings in my /etc/vsftpd.conf are:
dirmessage_enable=YES
chroot_local_user=YES
local_enable=YES
anonymous_enable=NO
syslog_enable=YES
connect_from_port_20=YES
pasv_enable=YES
listen=YES
ssl_enable=NO
And I added umask 022 to the user login script problem I have: I login with user and password that exists as a local user on my suse machine. I can read and download from my homedirectory, but I cannot upload with filezilla. Then I get the error: 550 permission denied critical file transfer error
View 3 Replies
View Related
Apr 20, 2011
I was trying to copy a few files to my phone via bluetooth when the file transfer window popped up with the progress bar stating "Connecting" and an error: the name org.openbox.client was not provided by any .service files..
I am using: openSUSE 11.3
Gnome 2.32, Kernel 2.6.38,
obex-data-server 0.4.5-12.2,
[code]....
View 3 Replies
View Related
Aug 11, 2010
I use Rhythmbox to transfer songs to my iPod (nano 1st gen). I installed Mediatomb the other day so I could stream music and video on my PS3 (which is awesome btw). Unfortunately, using Mediatomb my PS3 would only find a small portion of my music collection.So I ran Code:sudo nautilus then right clicked on my music folder, and changed the Group category to "Create and delete files" under the Permissions tab. After, my PS3 found my entire music collection. Great. But now in Rhythmbox I get an error about the mp3 files being read-only and can't transfer them to my iPod I've tried reversing the steps (with and without 'sudo'), but no luck. Under the File Access section of Permissions, I can never change anything (like to "read only" or "read and write"). No matter what I choose it always stays at "---"
View 2 Replies
View Related
Nov 17, 2010
I have a bluetooth headset for a cellphone, which I would like to use with my Ubuntu computers. I'm currently trying to do this with a computer running Jaunty. I have successfully paired the headset with the computer. But when I try to send an audio file to the headset, I get the "Sending files via Bluetooth dialogue box, immediately followed by the error message:
Quote: org.openobex.Error.NotSupported and no file transfer occurs. I am able to do other Bluetooth operations with other devices - eg I can send/receive files between the computer and my cellphone. It just seems to me that using a Bluetooth cellphone headset is not supported, or that I am doing something wrong.
UPDATE: I just tried doing this with my other machine running 10.04, with similar results. It looks momentarily like it's going to transfer the file, then reports that "an unknown error occurred". Is it just not possible to use bluetooth headsets for cellphones with Ubuntu computers? That doesn't seem very likely: when the computer detects the headset, it reports it as being a "headset". So why won't it work? What am I doing wrong?
View 1 Replies
View Related
Nov 11, 2010
We make everyday a DB Mysql backup on Linux redhat Enterprise. We are using a bash shell script (and putting it in the crontab) to execute it automatically everyday. We added a line to this script telling, once the backup has completed, to find old backup files (stored on hard disk after each backup) older than x days to remove them. We use the find command (search for file type) with the mtime option and in combination with rm command. Everything runs ok but we also want to add some new code to the same line: If find command cannot find anything or fails, for example if it cannot delete file or fails, send the error message (standard error output) to an error file (like error000001 and increasing) and mail the errorxxxx file to an email address for example to admin@companyname.com. What would be the code for this issue to add it to our find command in the same bash shell script??
View 2 Replies
View Related
Apr 12, 2011
how to rectify these errors..
RCC: Error in 'appchooser.qrc': Cannot find file 'accessories-dictionary.png'
RCC: Error in 'appchooser.qrc': Cannot find file 'akregator.png'
RCC: Error in 'appchooser.qrc': Cannot find file 'digikam.png'
RCC: Error in 'appchooser.qrc': Cannot find file 'k3b.png'
RCC: Warning: No resources in 'appchooser.qrc'.
and my .qrc file is like this
<!DOCTYPE RCC><RCC version="1.0">
<qresource>
<file>accessories-dictionary.png</file>
<file>akregator.png</file>
<file>digikam.png</file>
code....
View 3 Replies
View Related
Jul 26, 2010
It's kind of pointless imo for the types of errors that Exiv2 reports on to be written to a text file without some reference to the name of the file that prompted the error message in the first place. Is there a way to have bash identify the file that prompts the error and writes its name to the same file as the error (in my case, frencherrors.TX)?I've tried a painfully simple syntax that does something identical to a 2>&1 'suffix", namely frenchgentsfinder.sh 2 $file>>frencherrors.TX. It makes sense to me as written, but I'd like to know why I'm getting nothing on screen and everything directed to the file when what I want to see in the latter are the filenames causing the errors along with the text of the errors.
Is there another level one has to bore down into before they can garner this kind of output? If so, what is it and how does one invoke it in bash?
View 11 Replies
View Related
Feb 13, 2011
gcc kk.c : kk.c:1: fatal error: gtk/gtk.h: No such file or directory compilation terminated.
View 1 Replies
View Related
Mar 8, 2011
In my project iam using timerfd.h file info. I included it header file, Iam using "arm-none-linux-gnueabi-gcc" compiler. This file exists in "arm-2010q1/arm-none-linux-gnueabi/libc/usr/include/sys". When i try to execute the program iam getting error: sys/timerfd.h: No such file or directory. remaining files able to find from the same location(sys/time.h, sys/ioctl.h,sys/socket.h).
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <signal.h>
[Code].....
View 1 Replies
View Related
Apr 6, 2010
I'm trying to do a svnsync of this public repo: http://svn.runuo.com/repos/runuo/devel/ so I can access the repo when my machine is offline. I get this error at revision 419 svnsync: File not found: transaction '419-bn', path '/devel/Scripts/Engines/Doom/Lamp Room/LampController.cs'
I am using svnsync, version 1.6.5 (r38866)
View 6 Replies
View Related
May 6, 2010
[root@shankar-lx src1]# make
gcc -c main.c
gcc -c database.c
gcc -c e_sqlite.c
gcc -o TEST main.o database.o e_sqlite.o /usr/local/lib/libsqlite3.so.0.8.6 -w -lpthread
[root@shankar-lx src1]# ./TEST
./TEST: error while loading shared libraries: /usr/lib/libsqlite3.so.0: ELF file OS ABI invalid
My application compiled well but when try to run, it is giving ELF file OS ABI invalid ERROR. What is this error.
Kernel version is 2.4-18
View 1 Replies
View Related
Dec 14, 2010
In posix multi threading, how to send thread1 local data to thread2...?
View 3 Replies
View Related
May 30, 2010
So the above is the error message I am receiving when trying to compile (at make stage when error received) binutils 2.20.1. I am compiling in Virtualbox and the base machine is SourceMage 64bit.
View 4 Replies
View Related
Apr 12, 2010
I have a bash script giving me the following error:
[Code]...
When I run it I am getting: ./svnup: line 61: syntax error: unexpected end of file Can't for the life of me figure out what is wrong. It's a script to export the latest revision from SVN to the web root folder and archive the previous version, basically.
View 4 Replies
View Related
Apr 22, 2010
I am trying to compile a software using a provided sdk. I suspect that the sdk has some mismatch of the platform library, but I am not sure.
The error I got is
Code:
The libidata.so.42 is there in that folder. I guess the file might be in a big endian. Is there a way to check if the libidata.so.42 i have might be a big endian format, rather than little endian?
If my guess is incorrect, This is a c++ code on fedora x86 machine.
View 4 Replies
View Related
Jan 16, 2011
Recently I have downloaded TBB and I want to run a program using its libraries. But I encountered the following error: Linker: fatal error LNK1104: cannot open file 'tbb_debug.lib'
View 1 Replies
View Related
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
Jun 16, 2010
I got some problems and need your help.
In school, my codes are writeen under UNIX system (Solaris10/SUN), now I need to transfer those codes to Linux (Redhat5). But after I directly copy to Linux, it shows many errors and warnings.
Does anyone know which codes I need to modify to specifily suit for UNIX? I am not familiar with those systems and hope to get your kind help.
View 5 Replies
View Related
May 25, 2011
I want to search for 1 file (say test.txt) on first server and all the output of this search to be greped as per my requirement and then transfered on the second server at the same location where they were on first server.
E.g.
output of search of file (test.txt) >> output.txt
/tmp/test.txt
/home/cpan/test.txt
/opt/cpanel/test.txt
Now I want to grep this output to only related to cpanel,
for f in 'cat output.txt'
echo $f | grep "cpanel"
if [ $? -eq 0 ]
then do scp.
But I am bit confused here, as in how to use scp command here.
scp $f root@second_server:/$f ?
View 3 Replies
View Related
Dec 28, 2009
I made a shell script with the following piece of code to transfer some files via ftp:
Code:
echo 'before ftp'
ftp -n $FtpHost << EOF
quote USER $FtpUser
quote PASS $FtpPasswd
quote CWD $FtpDir
put $FileNameLog
put $FileNameSqlTarSum
put $FileNameSqlTar
put $FileNameWwwTarSum
put $FileNameTar
quit
EOF
echo 'before rm'
rm $FileNameWwwTar $FileNameWwwTarSum $FileNameSql $FileNameSqlTar $FileNameSqlTarSum $FileNameLog
echo 'after rm'
The problem is that the script ends after the "quit" command in FTP, so code after it won't run, like the remove of temporary files. If I remove this "quit" command, the shell understands I'm still parsing commands to FTP, although being after the EOF. I used this echo commands to check which parts of the script are running.
View 7 Replies
View Related
Apr 1, 2010
I am currently using Ubuntu 9.10. I am writing a small code in C which test the connectivity with MYSQL. I am getting this error. "libmysqlclient.so.14: cannot open shared object file: No such file or directory" What I understand is that you need MYSQL development package in order to access MYSQL database in C. I installed MYSQL using this command. apt-get install mysql-server mysql-client
View 2 Replies
View Related
Oct 23, 2010
I am running shell command through C program using system() routine.
I am executing "opcontrol --status" an executable using the this routine and I get the following error. access: unix error (2) No such file or directory
But when I give the complete path to the executable it runs perfectly.
The executable is installed in "/usr/local/bin/" And the path variable has this path.
View 1 Replies
View Related
Apr 21, 2010
I have the following working script. It checks the directory for txt files, if files are there, it copies to another directory or gives error. I would like to exclude "file not found" errors and send them to /dev/null. All other errors should go to the email address as usual.
Code:
#!/bin/bash
function err
{
if [[ $? -ne 0 ]]
[Code]....
View 7 Replies
View Related
May 25, 2010
I have a linux server and I have SSH Access to it.
How do I transfer my files to my desktop.
View 1 Replies
View Related
Aug 5, 2011
I have setup ssh between a F15 box and a remote centOS box. I am using ssh -X, then nautilus/gnome-session to open a gui file browser/desktop environment of remote machine. But anything I want to copy from remote machine to local machine by gui, is showing 'path not found' error. CLI work just fine but is it possible to transfer files between remote and local machine by gui over ssh?
View 3 Replies
View Related