projects
/
openvswitch
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
80a28d9
)
New function dhclient_get_netdev().
author
Ben Pfaff
<blp@nicira.com>
Wed, 8 Oct 2008 21:09:37 +0000
(14:09 -0700)
committer
Ben Pfaff
<blp@nicira.com>
Thu, 9 Oct 2008 22:53:05 +0000
(15:53 -0700)
include/dhcp-client.h
patch
|
blob
|
history
lib/dhcp-client.c
patch
|
blob
|
history
diff --git
a/include/dhcp-client.h
b/include/dhcp-client.h
index 39091434107135c6bbca8962f22312aabfc7970d..e0d1e37c574b1202bb13874ebf1fcdd4097cecea 100644
(file)
--- a/
include/dhcp-client.h
+++ b/
include/dhcp-client.h
@@
-46,6
+46,8
@@
int dhclient_create(const char *netdev,
void *aux, struct dhclient **);
void dhclient_destroy(struct dhclient *);
void *aux, struct dhclient **);
void dhclient_destroy(struct dhclient *);
+struct netdev *dhclient_get_netdev(struct dhclient *);
+
void dhclient_init(struct dhclient *, uint32_t requested_ip);
void dhclient_release(struct dhclient *);
void dhclient_force_renew(struct dhclient *, int deadline);
void dhclient_init(struct dhclient *, uint32_t requested_ip);
void dhclient_release(struct dhclient *);
void dhclient_force_renew(struct dhclient *, int deadline);
diff --git
a/lib/dhcp-client.c
b/lib/dhcp-client.c
index 1e481cf8fc4edb6c84e38b791114442699e386b9..db0bb0bd129d731110b02fa06abef90876e1adcd 100644
(file)
--- a/
lib/dhcp-client.c
+++ b/
lib/dhcp-client.c
@@
-219,6
+219,14
@@
dhclient_destroy(struct dhclient *cli)
}
}
}
}
+/* Returns the network device in use by 'cli'. The caller must not destroy
+ * the returned device. */
+struct netdev *
+dhclient_get_netdev(struct dhclient *cli)
+{
+ return cli->netdev;
+}
+
/* Forces 'cli' into a (re)initialization state, in which no address is bound
* but the client is advertising to obtain one. If 'requested_ip' is nonzero,
* then the client will attempt to re-bind to that IP address; otherwise, it
/* Forces 'cli' into a (re)initialization state, in which no address is bound
* but the client is advertising to obtain one. If 'requested_ip' is nonzero,
* then the client will attempt to re-bind to that IP address; otherwise, it