[lkml]   [2000]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Any good _online_ kernel BSD sockets reference out there??
> - Userspace:
> sd = socket(AF_PACKET, SOCK_RAW, 0); (Is this correct??)

It can be for pure raw data

> bind(how do I bind this socket to the interface, if I don't have
> an address?? Can I just make one up??);


(see linux/if_packet.h>

> send(sd, data, len);


> - Kernel:
> "send" makes kernel call dev_queue_xmit(), which will call the
> driver's hard_start_xmit function.


> Questions:
> - Do I need to bring the interface up with ifconfig before being able to
> do this?? My question is because ifconfig doesn't have a "raw mode"
> address family ...

It needs to be up, but it doesnt need to be assigned IP addresses in current
kernels (2.0 does need IP)

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:38    [W:0.047 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site