[Click] FromDevice on OS-X pooling up packets...
Nicholas Weaver
nweaver at ICSI.Berkeley.EDU
Wed Apr 14 14:33:33 EDT 2010
A minor strangeness on FromDevice:
This is the example configuration I'm using...
FromDevice(en0, PROMISC true) -> CheckIPHeader(14) ->
IPClassifier(dst udp port 68) ->
IPPrint('reply ') ->
CheckDHCPMsg() ->
IPPrint('replyok') ->
dhcpc :: DHCPClient(ca:fe:ba:be:00:01, LEASE_CALL newlease.run)
-> UDPIPEncap(0.0.0.0, bootpc, 255.255.255.255, bootps)
-> EtherEncap(0x0800, ca:fe:ba:be:00:01, ff:ff:ff:ff:ff:ff)
-> IPPrint('request:') -> en0queue::Queue() -> ToDevice(en0);
dhcpc[1] -> dhcp_udp :: UDPIPEncap(0.0.0.0, bootpc, 255.255.255.255, bootps)
-> EtherEncap(0x0800, ca:fe:ba:be:00:01, ff:ff:ff:ff:ff:ff)
-> IPPrint('detail:') -> en0queue;
newlease :: Script(TYPE PASSIVE,
goto end $(not $1),
write dhcp_udp.src $2,
write dhcp_udp.dst $3)
(Basically, the DHCPClient example)
The interesting thing, the FromDevice is not receiving individual packets, but only processing data after enough packets are read. I can see a TCPdump where the DHCP replies are being received, but they are not being received by the click script until I do some activity to dump a bunch of network traffic to the interface (eg, web fetch).
Any thoughts/comments?
More information about the click
mailing list