#include <linux/types.h>
#include <linux/string.h>
#include <linux/kernel.h>
#include <linux/jiffies.h>
#include <linux/random.h>
#include <linux/init.h>
#include <linux/utsname.h>
#include <linux/in.h>
#include <linux/if.h>
#include <linux/inet.h>
#include <linux/inetdevice.h>
#include <linux/netdevice.h>
#include <linux/if_arp.h>
#include <linux/skbuff.h>
#include <linux/ip.h>
#include <linux/socket.h>
#include <linux/route.h>
#include <linux/udp.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/major.h>
#include <linux/root_dev.h>
#include <linux/delay.h>
#include <linux/nfs_fs.h>
#include <linux/slab.h>
#include <linux/export.h>
#include <net/net_namespace.h>
#include <net/arp.h>
#include <net/ip.h>
#include <net/ipconfig.h>
#include <net/route.h>
#include <linux/uaccess.h>
#include <net/checksum.h>
#include <asm/processor.h>
#if defined(CONFIG_IP_PNP_DHCP)
#define IPCONFIG_DHCP
#endif
#if defined(CONFIG_IP_PNP_BOOTP) || defined(CONFIG_IP_PNP_DHCP)
#define IPCONFIG_BOOTP
#endif
#if defined(CONFIG_IP_PNP_RARP)
#define IPCONFIG_RARP
#endif
#if defined(IPCONFIG_BOOTP) || defined(IPCONFIG_RARP)
#define IPCONFIG_DYNAMIC
#endif
#define CONF_POST_OPEN …
#define CONF_OPEN_RETRIES …
#define CONF_SEND_RETRIES …
#define CONF_BASE_TIMEOUT …
#define CONF_TIMEOUT_RANDOM …
#define CONF_TIMEOUT_MULT …
#define CONF_TIMEOUT_MAX …
#define CONF_NAMESERVERS_MAX …
#define CONF_NTP_SERVERS_MAX …
#define NONE …
#define ANY …
static unsigned int carrier_timeout = …;
int ic_set_manually __initdata = …;
static int ic_enable __initdata;
int ic_proto_enabled __initdata = …
#endif
;
static int ic_host_name_set __initdata;
__be32 ic_myaddr = …;
static __be32 ic_netmask = …;
__be32 ic_gateway = …;
#ifdef IPCONFIG_DYNAMIC
static __be32 ic_addrservaddr = …;
#endif
__be32 ic_servaddr = …;
__be32 root_server_addr = …;
u8 root_server_path[256] = …;
static char vendor_class_identifier[253] __initdata;
#if defined(CONFIG_IP_PNP_DHCP)
static char dhcp_client_identifier[253] __initdata;
#endif
#ifdef IPCONFIG_DYNAMIC
static int ic_proto_used;
#else
#define ic_proto_used …
#endif
static __be32 ic_nameservers[CONF_NAMESERVERS_MAX];
static __be32 ic_ntp_servers[CONF_NTP_SERVERS_MAX];
static u8 ic_domain[64];
static char user_dev_name[IFNAMSIZ] __initdata = …;
static int ic_proto_have_if __initdata;
static int ic_dev_mtu __initdata;
#ifdef IPCONFIG_DYNAMIC
static DEFINE_SPINLOCK(ic_recv_lock);
static volatile int ic_got_reply __initdata;
#endif
#ifdef IPCONFIG_DHCP
static int ic_dhcp_msgtype __initdata;
#endif
struct ic_device { … };
static struct ic_device *ic_first_dev __initdata;
static struct ic_device *ic_dev __initdata;
static bool __init ic_is_init_dev(struct net_device *dev)
{ … }
static int __init ic_open_devs(void)
{ … }
static void __init ic_close_devs(void)
{ … }
static inline void
set_sockaddr(struct sockaddr_in *sin, __be32 addr, __be16 port)
{ … }
static int __init ic_setup_if(void)
{ … }
static int __init ic_setup_routes(void)
{ … }
static int __init ic_defaults(void)
{ … }
#ifdef IPCONFIG_RARP
static int ic_rarp_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev);
static struct packet_type rarp_packet_type __initdata = …;
static inline void __init ic_rarp_init(void)
{ … }
static inline void __init ic_rarp_cleanup(void)
{ … }
static int __init
ic_rarp_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev)
{ … }
static void __init ic_rarp_send_if(struct ic_device *d)
{ … }
#endif
static inline void __init ic_nameservers_predef(void)
{ … }
static inline void __init ic_ntp_servers_predef(void)
{ … }
#ifdef IPCONFIG_BOOTP
struct bootp_pkt { … };
#define BOOTP_REQUEST …
#define BOOTP_REPLY …
#define DHCPDISCOVER …
#define DHCPOFFER …
#define DHCPREQUEST …
#define DHCPDECLINE …
#define DHCPACK …
#define DHCPNAK …
#define DHCPRELEASE …
#define DHCPINFORM …
static int ic_bootp_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev);
static struct packet_type bootp_packet_type __initdata = …;
static int ic_nameservers_fallback __initdata;
static const u8 ic_bootp_cookie[4] = …;
#ifdef IPCONFIG_DHCP
static void __init
ic_dhcp_init_options(u8 *options, struct ic_device *d)
{ … }
#endif
static void __init ic_bootp_init_ext(u8 *e)
{ … }
static inline void __init ic_bootp_init(void)
{ … }
static inline void __init ic_bootp_cleanup(void)
{ … }
static void __init ic_bootp_send_if(struct ic_device *d, unsigned long jiffies_diff)
{ … }
static int __init ic_bootp_string(char *dest, char *src, int len, int max)
{ … }
static void __init ic_do_bootp_ext(u8 *ext)
{ … }
static int __init ic_bootp_recv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev)
{ … }
#endif
#ifdef IPCONFIG_DYNAMIC
static int __init ic_dynamic(void)
{ … }
#endif
#ifdef CONFIG_PROC_FS
static struct proc_dir_entry *ipconfig_dir;
static int pnp_seq_show(struct seq_file *seq, void *v)
{ … }
static int __init ipconfig_proc_net_init(void)
{ … }
static int ipconfig_proc_net_create(const char *name,
const struct proc_ops *proc_ops)
{ … }
static int ntp_servers_show(struct seq_file *seq, void *v)
{ … }
DEFINE_PROC_SHOW_ATTRIBUTE(…);
#endif
__be32 __init root_nfs_parse_addr(char *name)
{ … }
#define DEVICE_WAIT_MAX …
static int __init wait_for_devices(void)
{ … }
static int __init ip_auto_config(void)
{ … }
late_initcall(ip_auto_config);
static int __init ic_proto_name(char *name)
{ … }
static int __init ip_auto_config_setup(char *addrs)
{ … }
__setup(…);
static int __init nfsaddrs_config_setup(char *addrs)
{ … }
__setup(…);
static int __init vendor_class_identifier_setup(char *addrs)
{ … }
__setup(…);
static int __init set_carrier_timeout(char *str)
{ … }
__setup(…);