Ignore:
Timestamp:
Feb 20, 2016, 10:43:32 PM (8 years ago)
Author:
coas-nagasima
Message:

インクルードのパス指定をContikiに合わせ変更。
整数型の型名をContikiに合わせ変更。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uKadecot/trunk/uip/net/ipv4/uip_arp.c

    r157 r158  
    6060
    6161
    62 #include "uip_arp.h"
     62#include "net/ipv4/uip_arp.h"
    6363
    6464#include <string.h>
     
    7272struct arp_hdr {
    7373  struct uip_eth_hdr ethhdr;
    74   u16_t hwtype;
    75   u16_t protocol;
    76   u8_t hwlen;
    77   u8_t protolen;
    78   u16_t opcode;
     74  uint16_t hwtype;
     75  uint16_t protocol;
     76  uint8_t hwlen;
     77  uint8_t protolen;
     78  uint16_t opcode;
    7979  struct uip_eth_addr shwaddr;
    80   u16_t sipaddr[2];
     80  uint16_t sipaddr[2];
    8181  struct uip_eth_addr dhwaddr;
    82   u16_t dipaddr[2];
     82  uint16_t dipaddr[2];
    8383};
    8484
     
    8686  struct uip_eth_hdr ethhdr;
    8787  /* IP header. */
    88   u8_t vhl,
     88  uint8_t vhl,
    8989    tos,
    9090    len[2],
     
    9393    ttl,
    9494    proto;
    95   u16_t ipchksum;
    96   u16_t srcipaddr[2],
     95  uint16_t ipchksum;
     96  uint16_t srcipaddr[2],
    9797    destipaddr[2];
    9898};
     
    110110
    111111struct arp_entry {
    112   u16_t ipaddr[2];
     112  uint16_t ipaddr[2];
    113113  struct uip_eth_addr ethaddr;
    114   u8_t time;
     114  uint8_t time;
    115115};
    116116
    117117static const struct uip_eth_addr broadcast_ethaddr =
    118118  {{0xff,0xff,0xff,0xff,0xff,0xff}};
    119 static const u16_t broadcast_ipaddr[2] = {0xffff,0xffff};
    120 static const u16_t multicast_ipaddr[2] = { 0x00e0, 0x0000 };
    121 static const u16_t multicast_mask[2] = { 0x00f0, 0x0000 };
     119static const uint16_t broadcast_ipaddr[2] = {0xffff,0xffff};
     120static const uint16_t multicast_ipaddr[2] = { 0x00e0, 0x0000 };
     121static const uint16_t multicast_mask[2] = { 0x00f0, 0x0000 };
    122122
    123123static struct arp_entry arp_table[UIP_ARPTAB_SIZE];
    124 static u16_t ipaddr[2];
    125 static u8_t i, c;
    126 
    127 static u8_t arptime;
    128 static u8_t tmpage;
     124static uint16_t ipaddr[2];
     125static uint8_t i, c;
     126
     127static uint8_t arptime;
     128static uint8_t tmpage;
    129129
    130130#define BUF   ((struct arp_hdr *)&uip_buf[0])
     
    170170/*-----------------------------------------------------------------------------------*/
    171171static void
    172 uip_arp_update(u16_t *ipaddr, struct uip_eth_addr *ethaddr)
     172uip_arp_update(uint16_t *ipaddr, struct uip_eth_addr *ethaddr)
    173173{
    174174  register struct arp_entry *tabptr = NULL;
Note: See TracChangeset for help on using the changeset viewer.