linkd

Control plane daemon for unos
git clone git://git.finwo.net/app/linkd
Log | Files | Refs | README

dhcp.h (556B)


      1 #ifndef __LINKD_DHCP_H__
      2 #define __LINKD_DHCP_H__
      3 
      4 // Spawns `dhcp_client`, substituting {{interface}} per argv element, so no
      5 // shell. No client is known by name: whoever ships one ships the config for
      6 // it. The lease is applied by the client, not linkd.
      7 
      8 // Idempotent. -1 when unconfigured or the spawn failed, which fails the ifup.
      9 int dhcp_start(const char *ifname);
     10 
     11 void dhcp_stop(const char *ifname);
     12 void dhcp_stop_all(void);
     13 
     14 // Non-blocking sweep; an unexpected exit is logged at error level.
     15 void dhcp_reap(void);
     16 
     17 #endif // __LINKD_DHCP_H__