1 /* libbb_udhcp.h - busybox compatability wrapper */
3 /* bit of a hack, do this no matter what the order of the includes.
6 #ifdef CONFIG_INSTALL_NO_USR
8 #define DEFAULT_SCRIPT "/share/udhcpc/default.script"
11 #ifndef _LIBBB_UDHCP_H
12 #define _LIBBB_UDHCP_H
17 #ifdef CONFIG_FEATURE_UDHCP_SYSLOG
21 #ifdef CONFIG_FEATURE_UDHCP_DEBUG
25 #define COMBINED_BINARY
28 #define xfopen bb_xfopen
30 /* make safe the exported namespace */
32 #define background udhcp_background
33 #define start_log_and_pid udhcp_start_log_and_pid
35 #define run_script udhcp_run_script
37 #define init_header udhcp_init_header
38 #define get_packet udhcp_get_packet
39 #define checksum udhcp_checksum
40 #define raw_packet udhcp_raw_packet
41 #define kernel_packet udhcp_kernel_packet
43 #define pidfile_acquire udhcp_pidfile_acquire
44 #define pidfile_write_release udhcp_pidfile_write_release
46 #define get_option udhcp_get_option
47 #define end_option udhcp_end_option
48 #define add_option_string udhcp_add_option_string
49 #define add_simple_option udhcp_add_simple_option
50 #define option_lengths udhcp_option_lengths
52 #define listen_socket udhcp_listen_socket
53 #define read_interface udhcp_read_interface
55 #define client_config udhcp_client_config
57 #define server_config udhcp_server_config
63 #include <sys/sysinfo.h>
68 #define xmalloc malloc
69 #define xcalloc calloc
71 static inline FILE *xfopen(const char *file, const char *mode)
74 if (!(fp = fopen(file, mode))) {
75 perror("could not open input file");
83 #endif /* _LIBBB_UDHCP_H */