Sponsored Content
Full Discussion: recv() not workin fine.....
Special Forums IP Networking recv() not workin fine..... Post 87274 by Perderabo on Friday 21st of October 2005 04:43:50 PM
Old 10-21-2005
char *b;
reseves space a a pointer to a string. No space is reserved for the string itself. You need to use something like:
char b[30];
Now you have space for a 29 character string and a terminating null.
 

10 More Discussions You Might Find Interesting

1. Programming

recv() problems using AIX 4.33

I am opening a server socket on one of our machines and connection to it on the other machine. After making the connection if ether one of the systems does a recv() and ther is no data to receive then the buffer is filled with spaces and returns. I have no way of knowing if it is valid or not. ... (1 Reply)
Discussion started by: hazard0007
1 Replies

2. Programming

C Network Programming - recv() help

So I'm making a program that gets the IP Address of an inputed website, then sends the IP Address to an inputed host. This program has no real meaning, but just a learning experiment. So I sucessfully made the program, then I wanted to try out recv(), and it produces some weird output; here is the... (2 Replies)
Discussion started by: Octal
2 Replies

3. Shell Programming and Scripting

rsh within awk is not workin

cat input.sh | awk ' { cur1=tolower($1) cur2=tolower($2) rsh $cur1 report | grep $cur2 } ' hi, Have a look at the above code, the input.txt file contains two words in each line with space as delimiter, the first word is computer name and the 2nd word is file... (2 Replies)
Discussion started by: geeko
2 Replies

4. Shell Programming and Scripting

why is it workin for 1 file , but not for multiple files?

Hi , this peice of code is working for one file but not for multiple files. Can some one please tell me the reason??? for i in `ls -1 | egrep ''SOM.*` ; do filename=$(ls -1 $i) filename=$(print $filename) if ] then print "Skipping file $i since it already has... (1 Reply)
Discussion started by: somanath Patrud
1 Replies

5. Shell Programming and Scripting

determine the periodfor which user is workin

write a shell script that determines the period for which a specified user is workin on the system. (3 Replies)
Discussion started by: shawz
3 Replies

6. Programming

ABOUT RECV() SYSTEM CALL (regarding timer)

Hi all, I am facing a problem in recv() system call i.e.. in my project i have to implement timer for sending (data) and resending purpose when there is no acknowledgement. is there any way that recv() sys call has its own timer i.e., for ex: recv() has to wait for 10 secs. if any... (0 Replies)
Discussion started by: Rohil
0 Replies

7. Programming

Recv() call with timer(time out )

Hi all, I am facing a problem in recv() system call i.e.. in my project i have to implement timer for sending (data) and resending purpose when there is no acknowledgement. is there any way that recv() sys call has its own timer i.e., for ex: recv() has to wait for 10 secs. if any one knows... (2 Replies)
Discussion started by: Rohil
2 Replies

8. IP Networking

regarding recv function

hi, the syntax of recv function is: int recv( int sockfd, void *buffer, int length, unsigned int flags); Suppose i declared a buffer of size 100 ,then length to be specified in recv function is sizeof(buffer) or sizeof(buffer)-1 ( i.e 100 or 99) thanks in advance (2 Replies)
Discussion started by: kavitha rao
2 Replies

9. Programming

How can I tell when recv is finished with pending data?

I'm working with recv and I am having a heck of a lot of trouble ignoring excess data that I did not ask for. I was hoping someone could shine some light on the subject for me because I'm not getting anywhere fast. ---------- Post updated at 02:46 AM ---------- Previous update was at 12:31 AM... (2 Replies)
Discussion started by: Errigour
2 Replies

10. Shell Programming and Scripting

Bash regex evaluation not workin

I'm building a script that may received start and end date as parameters. I whant to make it as flexible as possible so I'm accepting epoch and date in a way that "date --date=" command may accept. In order to know if parameter provided is an epoc or a "date --date=" string I evaluate if the value... (2 Replies)
Discussion started by: lramirev
2 Replies
copyinstr(9r)															     copyinstr(9r)

NAME
copyinstr - General: Copies a null-terminated string from a user address space to a kernel address space SYNOPSIS
int copyinstr( char *user_src, char *kernel_dest, int maxlength, int *lencopied ); ARGUMENTS
Specifies the address in user space of the null-terminated string to be copied. Specifies the address in kernel space to copy the null- terminated string to. Specifies the maximum number of bytes to copy. Specifies the actual length of the string copied. DESCRIPTION
The copyinstr routine copies a specified null-terminated string from the unprotected user address space to a specified address in the pro- tected kernel address space. CAUTIONS
If the string being copied is not null terminated, copyinstr copies maxlength bytes into the kernel address space. RETURN VALUES
Upon successful completion, copyinstr returns the value 0 (zero) and the actual length of the string copied to the lencopied argument. Oth- erwise, it returns one of the following error constants defined in /usr/sys/include/sys/errno.h: The address in user space that you speci- fied in the user_src argument cannot be accessed. The length of the string exceeds the maxlength value. SEE ALSO
Routines: copyoutstr(9r) copyinstr(9r)
All times are GMT -4. The time now is 08:46 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy