Sponsored Content
Full Discussion: sendto in packet socket
Top Forums Programming sendto in packet socket Post 82464 by Rakesh Ranjan on Thursday 1st of September 2005 09:13:34 AM
Old 09-01-2005
Thanks andryk,
I'll take up ur suggestion and I don't have a choice too. I was just avoiding the SOCK_RAW for I think I need to delve into details of the device driver (may be netdevice) , I suppose I'll have to write on the device directly so I was using a function like sendto to avoid that as I need to finish up this work in short time.
I won't like to pester u more but for the last time I'm sending u the code ( in attachment ) I wrote if u (or anyone) happen to get the fault in it please tell me so that I don't repeat it (plz. forgive me for poor formatting as I coded it in vi but formatting seems to have changed during uploading...the code is error free but as said doesn't send anything to client (0 bytes sent) I have mentioned the problem in the comments.

Last edited by Rakesh Ranjan; 09-02-2005 at 08:08 AM..
 

10 More Discussions You Might Find Interesting

1. Ubuntu

Permission denied with sendto in Ubuntu

I hope to post in the right place, otherwise I apologize for this I wrote a UDP sender and a UDP receiver, my goal is to transmit a file from th sender to the receiver. I'm using Ubuntu 8.04 Compiling goes well but when I execute the sender, its "sendto" gives me the error "Permission denied" .... (0 Replies)
Discussion started by: Puntino
0 Replies

2. IP Networking

sendto invalid argument

Hi I lost a lot of time in understanding the message "sendto Invalid argument" when I execute the following code. This code is a simple UDP sender improved with some reliability feature. My goal is to send a file. I've reported only the code which may be useful. Can anyone help me? Thank you... (0 Replies)
Discussion started by: Puntino
0 Replies

3. IP Networking

Error in sendto and recvfrom

Hi guys below is the code which I wrote to send some message to the server and the receive a a reply message from the server. Initially, I wrote one program to sendto and one program to receive from, it is working fine seperately. When I tried coding sendto and recvfrom in a sinlge program then... (0 Replies)
Discussion started by: arunc.kris
0 Replies

4. UNIX for Advanced & Expert Users

connect problem for sctp socket (ipv6 socket) - Runtime fail Invalid Arguments

Hi, I was porting ipv4 application to ipv6; i was done with TCP transports. Now i am facing problem with SCTp transport at runtime. To test SCTP transport I am using following server and client socket programs. Server program runs fine, but client program fails giving Invalid Arguments for... (0 Replies)
Discussion started by: chandrutiptur
0 Replies

5. Programming

socket function to read a webpage (socket.h)

Why does this socket function only read the first 1440 chars of the stream. Why not the whole stream ? I checked it with gdm and valgrind and everything seems correct... #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <sys/stat.h> #include <string.h> #include... (3 Replies)
Discussion started by: cyler
3 Replies

6. Programming

Receiving broadcast packets using packet socket

Hello I try to send DHCP RENEW packets to the network and receive the responses. I broadcast the packet and I can see that it's successfully sent using Wireshark. But I have difficulties receiving the responses.I use packet sockets to catch the packets. I can see that there are responses to my... (0 Replies)
Discussion started by: xyzt
0 Replies

7. IP Networking

Clarification - Setting socket options at the same time when socket is listening

I need clarification on whether it is okay to set socket options on a listening socket simultaneously when it is being used in an accept() call? Following is the scenario:- -- Task 1 - is executing in a loop - polling a listen socket, lets call it 'fd', (whose file descriptor is global)... (2 Replies)
Discussion started by: jake24
2 Replies

8. IP Networking

NS3 SendTo

Hi, I am working to implement a basic WiFi infrastructure in NS3. I have placed 16 APs in grid and one client is moving using random walk. Client and AP can communicate through message exchange. However, when I try a message of size more than 30 bytes, it is crashed. Please help me if anyone have... (0 Replies)
Discussion started by: dandapat
0 Replies

9. Programming

Raw Socket Programming - Efficient Packet Sniffer

Hi, I have the requirement to sniff packets from the Ethernet card on my Linux machine and process it and feed it to a RANAP protocol stack. So far I have written the raw packet sniffer and successfully sniffing packets and do little processing. However, for huge number of packets ... (9 Replies)
Discussion started by: rstnsrr
9 Replies

10. AIX

Packet loss coming with big packet size ping

(5 Replies)
Discussion started by: Vishal_dba
5 Replies
DEVCTL(8)						    BSD System Manager's Manual 						 DEVCTL(8)

NAME
devctl -- device control utility SYNOPSIS
devctl attach device devctl detach [-f] device devctl disable [-f] device devctl enable device devctl suspend device devctl resume device devctl set driver [-f] device driver DESCRIPTION
The devctl utility adjusts the state of individual devices in the kernel's internal device hierarchy. Each invocation of devctl consists of a single command followed by command-specific arguments. Each command operates on a single device specified via the device argument. The device may be specified either as the name of an existing device or as a bus-specific address. More details on supported address formats can be found in devctl(3). The following commands are supported: attach device Force the kernel to re-probe the device. If a suitable driver is found, it is attached to the device. detach [-f] device Detach the device from its current device driver. If the -f flag is specified, the device driver will be detached even if the device is busy. disable [-f] device Disable a device. If the device is currently attached to a device driver, the device driver will be detached from the device, but the device will retain its current name. If the -f flag is specified, the device driver will be detached even if the device is busy. enable device Enable a device. The device will probe and attach if a suitable device driver is found. Note that this can re-enable a device dis- abled at boot time via a loader tunable. suspend device Suspend a device. This may include placing the device in a reduced power state. resume device Resume a suspended device to a fully working state. set driver [-f] device driver Force the device to use a device driver named driver. If the device is already attached to a device driver and the -f flag is speci- fied, the device will be detached from its current device driver before it is attached to the new device driver. If the device is already attached to a device driver and the -f flag is not specified, the device will not be changed. SEE ALSO
devctl(3), devinfo(8) HISTORY
The devctl utility first appeared in FreeBSD 11.0. BSD
February 5, 2015 BSD
All times are GMT -4. The time now is 01:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy