Changeset 125 for uKadecot/trunk/uip/task/uip_task.c
- Timestamp:
- Jul 23, 2015, 3:21:02 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uKadecot/trunk/uip/task/uip_task.c
r108 r125 82 82 int uip_out_wpos = 0; 83 83 int uip_out_rpos = 0; 84 constu8_t my_ip[4] = { IPV4_ADDR_LOCAL };85 constu8_t my_netmask[4] = { IPV4_ADDR_LOCAL_MASK };86 constu8_t my_default_router[4] = { IPV4_ADDR_DEFAULT_GW };84 u8_t my_ip[4] = { IPV4_ADDR_LOCAL }; 85 u8_t my_netmask[4] = { IPV4_ADDR_LOCAL_MASK }; 86 u8_t my_default_router[4] = { IPV4_ADDR_DEFAULT_GW }; 87 87 int ws_out_req; 88 88 int ws_out_res; 89 89 #ifdef __DHCPC_H__ 90 90 struct dhcpc_state *dhcpc; 91 extern bool_t dhcp_enable; 91 92 #endif 92 93 … … 113 114 uip_init(); 114 115 #ifdef __DHCPC_H__ 115 dhcpc = dhcpc_init(uip_ethaddr.addr, sizeof(uip_ethaddr.addr)); 116 if(dhcp_enable){ 117 dhcpc = dhcpc_init(uip_ethaddr.addr, sizeof(uip_ethaddr.addr)); 118 } 116 119 #endif 117 120 uip_task_init((intptr_t)uiptsk); … … 132 135 ic->link_pre = ic->link_now; 133 136 if(cng && ic->link_pre){ 134 sil_wrb_mem((uint8_t *)0x0008C02A, sil_reb_mem((uint8_t *)0x0008C02A) | 0x04);135 137 #ifdef __DHCPC_H__ 136 uip_buf = uiptsk->uip_buf; 137 uip_len = 0; 138 dhcpc_request(dhcpc); 139 /* If the above function invocation resulted in data that 140 should be sent out on the network, the global variable 141 uip_len is set to a value > 0. */ 142 if (uip_len > 0) { 143 uip_arp_out(); 144 IF_ETHER_NIC_START(ic, uip_buf, uip_len); 138 if(dhcp_enable){ 139 sil_wrb_mem((uint8_t *)0x0008C02A, sil_reb_mem((uint8_t *)0x0008C02A) | 0x04); 140 uip_buf = uiptsk->uip_buf; 141 uip_len = 0; 142 dhcpc_request(dhcpc); 143 /* If the above function invocation resulted in data that 144 should be sent out on the network, the global variable 145 uip_len is set to a value > 0. */ 146 if (uip_len > 0) { 147 uip_arp_out(); 148 IF_ETHER_NIC_START(ic, uip_buf, uip_len); 149 } 150 } 151 else{ 152 DHCP4_CLI_SET_ADDR_CALLBACK(); 145 153 } 146 154 #else
Note:
See TracChangeset
for help on using the changeset viewer.