Replaced tabs with space.

This commit is contained in:
christiaans 2006-11-17 10:51:13 +00:00
parent fe1bea9538
commit d4b6471d39
10 changed files with 74 additions and 74 deletions

View File

@ -495,7 +495,7 @@ static void dhcp_handle_ack(struct netif *netif)
dhcp->dns_count = dhcp_get_option_byte(&option_ptr[1]) / (u32_t)sizeof(struct ip_addr); dhcp->dns_count = dhcp_get_option_byte(&option_ptr[1]) / (u32_t)sizeof(struct ip_addr);
/* limit to at most DHCP_MAX_DNS DNS servers */ /* limit to at most DHCP_MAX_DNS DNS servers */
if (dhcp->dns_count > DHCP_MAX_DNS) if (dhcp->dns_count > DHCP_MAX_DNS)
dhcp->dns_count = DHCP_MAX_DNS; dhcp->dns_count = DHCP_MAX_DNS;
for (n = 0; n < dhcp->dns_count; n++) { for (n = 0; n < dhcp->dns_count; n++) {
dhcp->offered_dns_addr[n].addr = htonl(dhcp_get_option_long(&option_ptr[2 + n * 4])); dhcp->offered_dns_addr[n].addr = htonl(dhcp_get_option_long(&option_ptr[2 + n * 4]));
} }
@ -540,17 +540,17 @@ err_t dhcp_start(struct netif *netif)
LWIP_DEBUGF(DHCP_DEBUG | DBG_TRACE | DBG_STATE | 3, ("dhcp_start(): restarting DHCP configuration\n")); LWIP_DEBUGF(DHCP_DEBUG | DBG_TRACE | DBG_STATE | 3, ("dhcp_start(): restarting DHCP configuration\n"));
} }
/* clear data structure */ /* clear data structure */
memset(dhcp, 0, sizeof(struct dhcp)); memset(dhcp, 0, sizeof(struct dhcp));
/* allocate UDP PCB */ /* allocate UDP PCB */
dhcp->pcb = udp_new(); dhcp->pcb = udp_new();
if (dhcp->pcb == NULL) { if (dhcp->pcb == NULL) {
LWIP_DEBUGF(DHCP_DEBUG | DBG_TRACE, ("dhcp_start(): could not obtain pcb\n")); LWIP_DEBUGF(DHCP_DEBUG | DBG_TRACE, ("dhcp_start(): could not obtain pcb\n"));
mem_free((void *)dhcp); mem_free((void *)dhcp);
netif->dhcp = dhcp = NULL; netif->dhcp = dhcp = NULL;
return ERR_MEM; return ERR_MEM;
} }
LWIP_DEBUGF(DHCP_DEBUG | DBG_TRACE, ("dhcp_start(): starting DHCP configuration\n")); LWIP_DEBUGF(DHCP_DEBUG | DBG_TRACE, ("dhcp_start(): starting DHCP configuration\n"));
/* (re)start the DHCP negotiation */ /* (re)start the DHCP negotiation */
result = dhcp_discover(netif); result = dhcp_discover(netif);
if (result != ERR_OK) { if (result != ERR_OK) {

View File

@ -58,7 +58,7 @@
#ifndef LWIP_CHKSUM #ifndef LWIP_CHKSUM
#define LWIP_CHKSUM lwip_standard_chksum #define LWIP_CHKSUM lwip_standard_chksum
#if 1 /* Version A */ #if 1 /* Version A */
/** /**
* lwip checksum * lwip checksum
* *
@ -109,7 +109,7 @@ lwip_standard_chksum(void *dataptr, u16_t len)
} }
#endif #endif
#if 0 /* Version B */ #if 0 /* Version B */
/* /*
* Curt McDowell * Curt McDowell
* Broadcom Corp. * Broadcom Corp.
@ -161,7 +161,7 @@ lwip_standard_chksum(void *dataptr, int len)
} }
#endif #endif
#if 0 /* Version C */ #if 0 /* Version C */
/** /**
* An optimized checksum routine. Basically, it uses loop-unrolling on * An optimized checksum routine. Basically, it uses loop-unrolling on
* the checksum loop, treating the head and tail bytes specially, whereas * the checksum loop, treating the head and tail bytes specially, whereas
@ -386,20 +386,20 @@ inet_aton(const char *cp, struct in_addr *addr)
if (c == '0') { if (c == '0') {
c = *++cp; c = *++cp;
if (c == 'x' || c == 'X') { if (c == 'x' || c == 'X') {
base = 16; base = 16;
c = *++cp; c = *++cp;
} else } else
base = 8; base = 8;
} }
for (;;) { for (;;) {
if (isdigit(c)) { if (isdigit(c)) {
val = (val * base) + (int)(c - '0'); val = (val * base) + (int)(c - '0');
c = *++cp; c = *++cp;
} else if (base == 16 && isxdigit(c)) { } else if (base == 16 && isxdigit(c)) {
val = (val << 4) | (int)(c + 10 - (islower(c) ? 'a' : 'A')); val = (val << 4) | (int)(c + 10 - (islower(c) ? 'a' : 'A'));
c = *++cp; c = *++cp;
} else } else
break; break;
} }
if (c == '.') { if (c == '.') {
/* /*
@ -409,7 +409,7 @@ inet_aton(const char *cp, struct in_addr *addr)
* a.b (with b treated as 24 bits) * a.b (with b treated as 24 bits)
*/ */
if (pp >= parts + 3) if (pp >= parts + 3)
return (0); return (0);
*pp++ = val; *pp++ = val;
c = *++cp; c = *++cp;
} else } else

View File

@ -113,7 +113,7 @@ icmp_input(struct pbuf *p, struct netif *inp)
pbuf_header(p, hlen); pbuf_header(p, hlen);
ip_output_if(p, &(iphdr->src), IP_HDRINCL, ip_output_if(p, &(iphdr->src), IP_HDRINCL,
IPH_TTL(iphdr), 0, IP_PROTO_ICMP, inp); IPH_TTL(iphdr), 0, IP_PROTO_ICMP, inp);
break; break;
default: default:
LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ICMP type %"S16_F" code %"S16_F" not supported.\n", (s16_t)type, (s16_t)code)); LWIP_DEBUGF(ICMP_DEBUG, ("icmp_input: ICMP type %"S16_F" code %"S16_F" not supported.\n", (s16_t)type, (s16_t)code));
@ -151,7 +151,7 @@ icmp_dest_unreach(struct pbuf *p, enum icmp_dur_type t)
snmp_inc_icmpoutdestunreachs(); snmp_inc_icmpoutdestunreachs();
ip_output(q, NULL, &(iphdr->src), ip_output(q, NULL, &(iphdr->src),
ICMP_TTL, 0, IP_PROTO_ICMP); ICMP_TTL, 0, IP_PROTO_ICMP);
pbuf_free(q); pbuf_free(q);
} }
@ -188,7 +188,7 @@ icmp_time_exceeded(struct pbuf *p, enum icmp_te_type t)
/* increase number of destination unreachable messages attempted to send */ /* increase number of destination unreachable messages attempted to send */
snmp_inc_icmpouttimeexcds(); snmp_inc_icmpouttimeexcds();
ip_output(q, NULL, &(iphdr->src), ip_output(q, NULL, &(iphdr->src),
ICMP_TTL, 0, IP_PROTO_ICMP); ICMP_TTL, 0, IP_PROTO_ICMP);
pbuf_free(q); pbuf_free(q);
} }

View File

@ -112,8 +112,8 @@ memp_sanity(void)
for (m = memp_tab[i]; m != NULL; m = m->next) { for (m = memp_tab[i]; m != NULL; m = m->next) {
c = 1; c = 1;
for (n = memp_tab[i]; n != NULL; n = n->next) { for (n = memp_tab[i]; n != NULL; n = n->next) {
if (n == m && --c < 0) { if (n == m && --c < 0) {
return 0; /* LW was: abort(); */ return 0; /* LW was: abort(); */
} }
} }
} }

View File

@ -96,7 +96,7 @@ stats_display(void)
{ {
s16_t i; s16_t i;
char * memp_names[] = {"PBUF", "RAW_PCB", "UDP_PCB", "TCP_PCB", "TCP_PCB_LISTEN", char * memp_names[] = {"PBUF", "RAW_PCB", "UDP_PCB", "TCP_PCB", "TCP_PCB_LISTEN",
"TCP_SEG", "NETBUF", "NETCONN", "API_MSG", "TCP_MSG", "TIMEOUT"}; "TCP_SEG", "NETBUF", "NETCONN", "API_MSG", "TCP_MSG", "TIMEOUT"};
stats_display_proto(&lwip_stats.link, "LINK"); stats_display_proto(&lwip_stats.link, "LINK");
stats_display_proto(&lwip_stats.ip_frag, "IP_FRAG"); stats_display_proto(&lwip_stats.ip_frag, "IP_FRAG");
stats_display_proto(&lwip_stats.ip, "IP"); stats_display_proto(&lwip_stats.ip, "IP");

View File

@ -614,8 +614,8 @@ udp_remove(struct udp_pcb *pcb)
for (pcb2 = udp_pcbs; pcb2 != NULL; pcb2 = pcb2->next) { for (pcb2 = udp_pcbs; pcb2 != NULL; pcb2 = pcb2->next) {
/* find pcb in udp_pcbs list */ /* find pcb in udp_pcbs list */
if (pcb2->next != NULL && pcb2->next == pcb) { if (pcb2->next != NULL && pcb2->next == pcb) {
/* remove pcb from list */ /* remove pcb from list */
pcb2->next = pcb->next; pcb2->next = pcb->next;
} }
} }
memp_free(MEMP_UDP_PCB, pcb); memp_free(MEMP_UDP_PCB, pcb);

View File

@ -45,9 +45,9 @@ void ip_init(void);
struct netif *ip_route(struct ip_addr *dest); struct netif *ip_route(struct ip_addr *dest);
err_t ip_input(struct pbuf *p, struct netif *inp); err_t ip_input(struct pbuf *p, struct netif *inp);
err_t ip_output(struct pbuf *p, struct ip_addr *src, struct ip_addr *dest, err_t ip_output(struct pbuf *p, struct ip_addr *src, struct ip_addr *dest,
u8_t ttl, u8_t tos, u8_t proto); u8_t ttl, u8_t tos, u8_t proto);
err_t ip_output_if(struct pbuf *p, struct ip_addr *src, struct ip_addr *dest, err_t ip_output_if(struct pbuf *p, struct ip_addr *src, struct ip_addr *dest,
u8_t ttl, u8_t tos, u8_t proto, u8_t ttl, u8_t tos, u8_t proto,
struct netif *netif); struct netif *netif);
#define IP_HLEN 20 #define IP_HLEN 20
@ -82,16 +82,16 @@ err_t ip_output_if(struct pbuf *p, struct ip_addr *src, struct ip_addr *dest,
/* /*
* Option flags per-socket. These are the same like SO_XXX. * Option flags per-socket. These are the same like SO_XXX.
*/ */
#define SOF_DEBUG (u16_t)0x0001U /* turn on debugging info recording */ #define SOF_DEBUG (u16_t)0x0001U /* turn on debugging info recording */
#define SOF_ACCEPTCONN (u16_t)0x0002U /* socket has had listen() */ #define SOF_ACCEPTCONN (u16_t)0x0002U /* socket has had listen() */
#define SOF_REUSEADDR (u16_t)0x0004U /* allow local address reuse */ #define SOF_REUSEADDR (u16_t)0x0004U /* allow local address reuse */
#define SOF_KEEPALIVE (u16_t)0x0008U /* keep connections alive */ #define SOF_KEEPALIVE (u16_t)0x0008U /* keep connections alive */
#define SOF_DONTROUTE (u16_t)0x0010U /* just use interface addresses */ #define SOF_DONTROUTE (u16_t)0x0010U /* just use interface addresses */
#define SOF_BROADCAST (u16_t)0x0020U /* permit sending of broadcast msgs */ #define SOF_BROADCAST (u16_t)0x0020U /* permit sending of broadcast msgs */
#define SOF_USELOOPBACK (u16_t)0x0040U /* bypass hardware when possible */ #define SOF_USELOOPBACK (u16_t)0x0040U /* bypass hardware when possible */
#define SOF_LINGER (u16_t)0x0080U /* linger on close if data present */ #define SOF_LINGER (u16_t)0x0080U /* linger on close if data present */
#define SOF_OOBINLINE (u16_t)0x0100U /* leave received OOB data in line */ #define SOF_OOBINLINE (u16_t)0x0100U /* leave received OOB data in line */
#define SOF_REUSEPORT (u16_t)0x0200U /* allow local address & port reuse */ #define SOF_REUSEPORT (u16_t)0x0200U /* allow local address & port reuse */

View File

@ -187,25 +187,25 @@
#define EMEDIUMTYPE 124 /* Wrong medium type */ #define EMEDIUMTYPE 124 /* Wrong medium type */
#define ENSROK 0 /* DNS server returned answer with no data */ #define ENSROK 0 /* DNS server returned answer with no data */
#define ENSRNODATA 160 /* DNS server returned answer with no data */ #define ENSRNODATA 160 /* DNS server returned answer with no data */
#define ENSRFORMERR 161 /* DNS server claims query was misformatted */ #define ENSRFORMERR 161 /* DNS server claims query was misformatted */
#define ENSRSERVFAIL 162 /* DNS server returned general failure */ #define ENSRSERVFAIL 162 /* DNS server returned general failure */
#define ENSRNOTFOUND 163 /* Domain name not found */ #define ENSRNOTFOUND 163 /* Domain name not found */
#define ENSRNOTIMP 164 /* DNS server does not implement requested operation */ #define ENSRNOTIMP 164 /* DNS server does not implement requested operation */
#define ENSRREFUSED 165 /* DNS server refused query */ #define ENSRREFUSED 165 /* DNS server refused query */
#define ENSRBADQUERY 166 /* Misformatted DNS query */ #define ENSRBADQUERY 166 /* Misformatted DNS query */
#define ENSRBADNAME 167 /* Misformatted domain name */ #define ENSRBADNAME 167 /* Misformatted domain name */
#define ENSRBADFAMILY 168 /* Unsupported address family */ #define ENSRBADFAMILY 168 /* Unsupported address family */
#define ENSRBADRESP 169 /* Misformatted DNS reply */ #define ENSRBADRESP 169 /* Misformatted DNS reply */
#define ENSRCONNREFUSED 170 /* Could not contact DNS servers */ #define ENSRCONNREFUSED 170 /* Could not contact DNS servers */
#define ENSRTIMEOUT 171 /* Timeout while contacting DNS servers */ #define ENSRTIMEOUT 171 /* Timeout while contacting DNS servers */
#define ENSROF 172 /* End of file */ #define ENSROF 172 /* End of file */
#define ENSRFILE 173 /* Error reading file */ #define ENSRFILE 173 /* Error reading file */
#define ENSRNOMEM 174 /* Out of memory */ #define ENSRNOMEM 174 /* Out of memory */
#define ENSRDESTRUCTION 175 /* Application terminated lookup */ #define ENSRDESTRUCTION 175 /* Application terminated lookup */
#define ENSRQUERYDOMAINTOOLONG 176 /* Domain name is too long */ #define ENSRQUERYDOMAINTOOLONG 176 /* Domain name is too long */
#define ENSRCNAMELOOP 177 /* Domain name is too long */ #define ENSRCNAMELOOP 177 /* Domain name is too long */
#ifndef errno #ifndef errno
extern int errno; extern int errno;

View File

@ -157,7 +157,7 @@ void tcp_rexmit_rto (struct tcp_pcb *pcb);
/* /*
* User-settable options (used with setsockopt). * User-settable options (used with setsockopt).
*/ */
#define TCP_NODELAY 0x01 /* don't delay send to coalesce packets */ #define TCP_NODELAY 0x01 /* don't delay send to coalesce packets */
#define TCP_KEEPALIVE 0x02 /* send KEEPALIVE probes when idle for pcb->keepalive miliseconds */ #define TCP_KEEPALIVE 0x02 /* send KEEPALIVE probes when idle for pcb->keepalive miliseconds */
/* Keepalive values */ /* Keepalive values */
@ -456,8 +456,8 @@ void tcp_timer_needed(void);
/* The TCP PCB lists. */ /* The TCP PCB lists. */
union tcp_listen_pcbs_t { /* List of all TCP PCBs in LISTEN state. */ union tcp_listen_pcbs_t { /* List of all TCP PCBs in LISTEN state. */
struct tcp_pcb_listen *listen_pcbs; struct tcp_pcb_listen *listen_pcbs;
struct tcp_pcb *pcbs; struct tcp_pcb *pcbs;
}; };
extern union tcp_listen_pcbs_t tcp_listen_pcbs; extern union tcp_listen_pcbs_t tcp_listen_pcbs;
extern struct tcp_pcb *tcp_active_pcbs; /* List of all TCP PCBs that are in a extern struct tcp_pcb *tcp_active_pcbs; /* List of all TCP PCBs that are in a

View File

@ -280,7 +280,7 @@ static s8_t find_entry(struct ip_addr *ipaddr, u8_t flags)
/* no empty entry found and not allowed to recycle? */ /* no empty entry found and not allowed to recycle? */
if ((empty == ARP_TABLE_SIZE) && ((flags & ETHARP_TRY_HARD) == 0)) if ((empty == ARP_TABLE_SIZE) && ((flags & ETHARP_TRY_HARD) == 0))
{ {
return (s8_t)ERR_MEM; return (s8_t)ERR_MEM;
} }
/* b) choose the least destructive entry to recycle: /* b) choose the least destructive entry to recycle:
@ -815,12 +815,12 @@ err_t etharp_query(struct netif *netif, struct ip_addr *ipaddr, struct pbuf *q)
if (p != NULL) { if (p != NULL) {
/* queue packet ... */ /* queue packet ... */
if (arp_table[i].p == NULL) { if (arp_table[i].p == NULL) {
/* ... in the empty queue */ /* ... in the empty queue */
pbuf_ref(p); pbuf_ref(p);
arp_table[i].p = p; arp_table[i].p = p;
#if 0 /* multi-packet-queueing disabled, see bug #11400 */ #if 0 /* multi-packet-queueing disabled, see bug #11400 */
} else { } else {
/* ... at tail of non-empty queue */ /* ... at tail of non-empty queue */
pbuf_queue(arp_table[i].p, p); pbuf_queue(arp_table[i].p, p);
#endif #endif
} }