"Robert P. J. Day" | 63fc1a9 | 2006-07-02 19:47:05 +0000 | [diff] [blame] | 1 | /* vi: set sw=4 ts=4: */ |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 2 | /* libbb_udhcp.h - busybox compatibility wrapper */ |
| 3 | |
| 4 | /* bit of a hack, do this no matter what the order of the includes. |
| 5 | * (for busybox) */ |
| 6 | |
| 7 | #ifndef _LIBBB_UDHCP_H |
| 8 | #define _LIBBB_UDHCP_H |
| 9 | |
Rob Landley | 3f78561 | 2006-05-28 01:06:36 +0000 | [diff] [blame] | 10 | #include "packet.h" |
| 11 | #include "busybox.h" |
| 12 | |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 13 | #ifdef CONFIG_INSTALL_NO_USR |
| 14 | # define DEFAULT_SCRIPT "/share/udhcpc/default.script" |
| 15 | #else |
| 16 | # define DEFAULT_SCRIPT "/usr/share/udhcpc/default.script" |
| 17 | #endif |
| 18 | |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 19 | |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 20 | |
| 21 | #define COMBINED_BINARY |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 22 | |
Rob Landley | 3f78561 | 2006-05-28 01:06:36 +0000 | [diff] [blame] | 23 | void udhcp_background(const char *pidfile); |
Denis Vlasenko | 239369b | 2006-09-07 17:05:44 +0000 | [diff] [blame] | 24 | void udhcp_start_log_and_pid(const char *pidfile); |
Rob Landley | 3f78561 | 2006-05-28 01:06:36 +0000 | [diff] [blame] | 25 | |
| 26 | void udhcp_run_script(struct dhcpMessage *packet, const char *name); |
| 27 | |
| 28 | // Still need to clean these up... |
| 29 | |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 30 | /* from pidfile.h */ |
| 31 | #define pidfile_acquire udhcp_pidfile_acquire |
| 32 | #define pidfile_write_release udhcp_pidfile_write_release |
| 33 | /* from options.h */ |
| 34 | #define get_option udhcp_get_option |
| 35 | #define end_option udhcp_end_option |
| 36 | #define add_option_string udhcp_add_option_string |
| 37 | #define add_simple_option udhcp_add_simple_option |
| 38 | #define option_lengths udhcp_option_lengths |
| 39 | /* from socket.h */ |
| 40 | #define listen_socket udhcp_listen_socket |
| 41 | #define read_interface udhcp_read_interface |
| 42 | /* from dhcpc.h */ |
| 43 | #define client_config udhcp_client_config |
| 44 | /* from dhcpd.h */ |
| 45 | #define server_config udhcp_server_config |
| 46 | |
Mike Frysinger | 7031f62 | 2006-05-08 03:20:50 +0000 | [diff] [blame] | 47 | #endif /* _LIBBB_UDHCP_H */ |