Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
BroadcastCommunity.qnx.com will be offline from May 31 6:00pm until June 2 12:00AM for upcoming system upgrades. For more information please go to https://community.qnx.com/sf/discussion/do/listPosts/projects.bazaar/discussion.bazaar.topc28418
Forum Topic - Send packet with BPF: Page 1 of 9 (9 Items)
   
Send packet with BPF  
Hey

I'm wondering how to send an packet with BPF.

Reading packet i send it working perfectly but send a packet is not working yet.

The device is opened with

if ((bpf = open(bpf_dev, O_RDWR)) < 0) {
	      perror("open");
}

I have tried to write to the file with the function write but cant got it to work. I think the problem cant be that i do
 not activate an send flag or something similar to driver.

Another way i have tryed is to send packet with the sendto function. It look likes

		  if (sendto(s, &dgram, 276, 0, (struct sockaddr *)&daddr,
			     sizeof(daddr)) < 0) {
		    perror("sendto");
		  }