DragonFly BSD
DragonFly users List (threaded) for 2009-10
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: dhclient dependency on bpf ?


From: Saifi Khan <saifi.khan@xxxxxxxxxxxxxxx>
Date: Fri, 23 Oct 2009 19:54:20 +0530 (IST)

On Fri, 23 Oct 2009, Alex wrote:

> probably because it needs to get packets that are directed to
> "broadcast" and not your machine.
> Just take a look at the source code.
> 
> 
> Sincerely,
> Alex Hornung
> 

Alex Hornung, thank you for the suggestion.

i looked at the code at sbin/dhclient and found the following sequence.


dhclient.c    main()

                  |
                  V

dispatch.c    dispatch()

                  |
                  V
                ...
          if ((fds[0].revents & (POLLIN | POLLHUP))) {
                  if (ifi->linkstat && ifi && ifi->rfdesc != -1)

                  |
                  V

dispatch.c    got_one()

                  |
                  V

bpf.c         receive_packet()


i'm a newbie and i hope i got this right.

Though i'm still on the lookout for the code fragment that
specifies the 'DHCP filter' expression.


thanks
Saifi.




[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]