send and recv ARP package in AS3.0


 
Thread Tools Search this Thread
Top Forums Programming send and recv ARP package in AS3.0
# 1  
Old 09-22-2005
Question send and recv ARP package in AS3.0

In attachment, is the code to test IP by ARP proxy. I always use it to test a IP already existing in my cluster.

Usage:
arp_func eth0 192.168.1.1

Enviroment:
IA64, RedHat AS3.0, 2.4.21-15.EL, gcc-3.2.3-34,
"gcc -o arp_func arp_func.c"

When the code below added before test_ip() in main(), program could receive ARP reply correctly:
fprintf(stdout, "anything");
or fprintf(stderr, "anything");
or getchar();
or fopen("anyfile", "anymode");

But, if the code above removed, recvfrom() fails and error is "Invalid argument".

I don't understand why the operations on other fds could affect the socket.

any dude can explain it? thanks in advance:-)
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Linux Red Hat AS3 Network card is not detecting ...

Dear Expert, I 've installed Redhat linux AS3, My machine having Inbuild network card (Intel(R) 82566DM-2 Gigabit Network Connection). I've downloaded e1000e-2.3.2 from Intel site, but its not working for my machine. I'm unable to configure the Network. ifconfig eth0 xx.xx.xx.xx netmask... (0 Replies)
Discussion started by: Mohammed Faiz
0 Replies

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

3. UNIX for Dummies Questions & Answers

log send, sendrec, recv and notify system calls

Hi, I've a question about MINIX OS. 1 - I would like to log the messages that user or kernel process send to each other through the system call send, recv, sendrec and notify. Since MINIX is a microkernel OS, I suppose that the best way is to have an TCP socket, listening in INADDR_ANY... (0 Replies)
Discussion started by: pedrosacosta
0 Replies

4. Shell Programming and Scripting

Use Send command of Expect package

HI All, I am currently working on one command line application on AIX (Unix Platform).Here i need to use Expect package. By using Expect package at the top of the script,i want to use just Send command of Expect package to send characters like, 1. Press Enter key 2. Press spacebar 3.... (6 Replies)
Discussion started by: neha123
6 Replies

5. Red Hat

RHEL(AS3)-Upd(5):System Cannot boot ....

Hi, After a reboot, One of My Proliant Machine DL380 could not load the O/S. Raid 1+0 was configured. Some Gathered Facts: During Boot from System Rescue, the following message appears "You don't have any linux partitions.Press return to get a shell. The system will reboot... (1 Reply)
Discussion started by: Muhammad Ahmad
1 Replies

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

7. Programming

UDP socket - can both client and server recv and send

Hi, Am very new to socket programming. When we use UDP sockets to communicate between two processess, will both the client/server socket be able to send/recv ? meaning can sendto()/ recvfrom() be used on both server and client? It could be useful even if anybody provide some link on socket... (1 Reply)
Discussion started by: rvan
1 Replies

8. UNIX for Dummies Questions & Answers

Processor Affinity on Redhat AS3

Does anyone know how to setup processor affinity on Redhat AS3.0. I know how to do this on Solaris and Windows.. Thanks (2 Replies)
Discussion started by: sssow
2 Replies

9. Linux

XDMCP Redaht As3

hello all, I was wondering if anyone had setup XDMCP client and server on thier Rehat AS3. I remember that it redhat 9 you just needed to enable XDMCP. Then you would get the chooser and enable you to connect to another X server. I was looking at this and reconfigure the xdm-config file, but... (0 Replies)
Discussion started by: larryase
0 Replies

10. 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
Login or Register to Ask a Question