/[lwip]/lwip/src/core/ipv4/ip.c
ViewVC logotype

Diff of /lwip/src/core/ipv4/ip.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.26.2.1 by kieranm, Wed Aug 20 16:46:16 2003 UTC revision 1.26.2.2 by kieranm, Thu Aug 21 09:59:21 2003 UTC
# Line 448  ip_input(struct pbuf *p, struct netif *i Line 448  ip_input(struct pbuf *p, struct netif *i
448   */   */
449  /*-----------------------------------------------------------------------------------*/  /*-----------------------------------------------------------------------------------*/
450  err_t  err_t
451  ip_output_if (struct pbuf *p, struct ip_addr *src, struct ip_addr *dest,  ip_output_if(struct pbuf *p, struct ip_addr *src, struct ip_addr *dest,
452               u8_t ttl,               u8_t ttl, u8_t tos,
453               u8_t proto, struct netif *netif)               u8_t proto, struct netif *netif)
454  {  {
455    static struct ip_hdr *iphdr;    static struct ip_hdr *iphdr;
# Line 475  ip_output_if (struct pbuf *p, struct ip_ Line 475  ip_output_if (struct pbuf *p, struct ip_
475    
476      ip_addr_set(&(iphdr->dest), dest);      ip_addr_set(&(iphdr->dest), dest);
477    
478      IPH_VHLTOS_SET(iphdr, 4, IP_HLEN / 4, 0);      IPH_VHLTOS_SET(iphdr, 4, IP_HLEN / 4, tos);
479      IPH_LEN_SET(iphdr, htons(p->tot_len));      IPH_LEN_SET(iphdr, htons(p->tot_len));
480      IPH_OFFSET_SET(iphdr, htons(IP_DF));      IPH_OFFSET_SET(iphdr, htons(IP_DF));
481      IPH_ID_SET(iphdr, htons(ip_id));      IPH_ID_SET(iphdr, htons(ip_id));
# Line 521  ip_output_if (struct pbuf *p, struct ip_ Line 521  ip_output_if (struct pbuf *p, struct ip_
521  /*-----------------------------------------------------------------------------------*/  /*-----------------------------------------------------------------------------------*/
522  err_t  err_t
523  ip_output(struct pbuf *p, struct ip_addr *src, struct ip_addr *dest,  ip_output(struct pbuf *p, struct ip_addr *src, struct ip_addr *dest,
524            u8_t ttl, u8_t proto)            u8_t ttl, u8_t tos, u8_t proto)
525  {  {
526    struct netif *netif;    struct netif *netif;
527    
# Line 535  ip_output(struct pbuf *p, struct ip_addr Line 535  ip_output(struct pbuf *p, struct ip_addr
535      return ERR_RTE;      return ERR_RTE;
536    }    }
537    
538    return ip_output_if (p, src, dest, ttl, proto, netif);    return ip_output_if(p, src, dest, ttl, tos, proto, netif);
539  }  }
540  /*-----------------------------------------------------------------------------------*/  /*-----------------------------------------------------------------------------------*/
541  #if IP_DEBUG  #if IP_DEBUG

Legend:
Removed from v.1.26.2.1  
changed lines
  Added in v.1.26.2.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26