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

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

Location:
uKadecot/trunk/uip/apps
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • uKadecot/trunk/uip/apps/dhcpc/dhcpc.c

    r125 r158  
    3535#include <string.h>
    3636
    37 #include "uip.h"
    38 #include "dhcpc.h"
    39 #include "timer.h"
    40 #include "pt.h"
     37#include "net/ip/uip.h"
     38#include "dhcpc/dhcpc.h"
     39#include "sys/timer.h"
     40#include "sys/pt.h"
    4141
    4242#define STATE_INITIAL         0
     
    5353
    5454struct dhcp_msg {
    55   u8_t op, htype, hlen, hops;
    56   u8_t xid[4];
    57   u16_t secs, flags;
    58   u8_t ciaddr[4];
    59   u8_t yiaddr[4];
    60   u8_t siaddr[4];
    61   u8_t giaddr[4];
    62   u8_t chaddr[16];
     55  uint8_t op, htype, hlen, hops;
     56  uint8_t xid[4];
     57  uint16_t secs, flags;
     58  uint8_t ciaddr[4];
     59  uint8_t yiaddr[4];
     60  uint8_t siaddr[4];
     61  uint8_t giaddr[4];
     62  uint8_t chaddr[16];
    6363#ifndef UIP_CONF_DHCP_LIGHT
    64   u8_t sname[64];
    65   u8_t file[128];
    66 #endif
    67   u8_t options[312];
     64  uint8_t sname[64];
     65  uint8_t file[128];
     66#endif
     67  uint8_t options[312];
    6868};
    6969
     
    103103#define DHCP_OPTION_END         255
    104104
    105 static const u8_t xid[4] = {0xad, 0xde, 0x12, 0x23};
    106 static const u8_t magic_cookie[4] = {99, 130, 83, 99};
    107 /*---------------------------------------------------------------------------*/
    108 static u8_t *
    109 add_msg_type(u8_t *optptr, u8_t type)
     105static const uint8_t xid[4] = {0xad, 0xde, 0x12, 0x23};
     106static const uint8_t magic_cookie[4] = {99, 130, 83, 99};
     107/*---------------------------------------------------------------------------*/
     108static uint8_t *
     109add_msg_type(uint8_t *optptr, uint8_t type)
    110110{
    111111  *optptr++ = DHCP_OPTION_MSG_TYPE;
     
    115115}
    116116/*---------------------------------------------------------------------------*/
    117 static u8_t *
    118 add_server_id(struct dhcpc_state *s, u8_t *optptr)
     117static uint8_t *
     118add_server_id(struct dhcpc_state *s, uint8_t *optptr)
    119119{
    120120  *optptr++ = DHCP_OPTION_SERVER_ID;
     
    124124}
    125125/*---------------------------------------------------------------------------*/
    126 static u8_t *
    127 add_req_ipaddr(struct dhcpc_state *s, u8_t *optptr)
     126static uint8_t *
     127add_req_ipaddr(struct dhcpc_state *s, uint8_t *optptr)
    128128{
    129129  *optptr++ = DHCP_OPTION_REQ_IPADDR;
     
    133133}
    134134/*---------------------------------------------------------------------------*/
    135 static u8_t *
    136 add_req_options(u8_t *optptr)
     135static uint8_t *
     136add_req_options(uint8_t *optptr)
    137137{
    138138  *optptr++ = DHCP_OPTION_REQ_LIST;
     
    144144}
    145145/*---------------------------------------------------------------------------*/
    146 static u8_t *
    147 add_end(u8_t *optptr)
     146static uint8_t *
     147add_end(uint8_t *optptr)
    148148{
    149149  *optptr++ = DHCP_OPTION_END;
     
    179179send_discover(struct dhcpc_state *s)
    180180{
    181   u8_t *end;
     181  uint8_t *end;
    182182  struct dhcp_msg *m = (struct dhcp_msg *)uip_appdata;
    183183
     
    188188  end = add_end(end);
    189189
    190   uip_send(uip_appdata, end - (u8_t *)uip_appdata);
     190  uip_send(uip_appdata, end - (uint8_t *)uip_appdata);
    191191}
    192192/*---------------------------------------------------------------------------*/
     
    194194send_request(struct dhcpc_state *s)
    195195{
    196   u8_t *end;
     196  uint8_t *end;
    197197  struct dhcp_msg *m = (struct dhcp_msg *)uip_appdata;
    198198
     
    204204  end = add_end(end);
    205205
    206   uip_send(uip_appdata, end - (u8_t *)uip_appdata);
    207 }
    208 /*---------------------------------------------------------------------------*/
    209 static u8_t
    210 parse_options(struct dhcpc_state *s, u8_t *optptr, int len)
    211 {
    212   u8_t *end = optptr + len;
    213   u8_t type = 0;
     206  uip_send(uip_appdata, end - (uint8_t *)uip_appdata);
     207}
     208/*---------------------------------------------------------------------------*/
     209static uint8_t
     210parse_options(struct dhcpc_state *s, uint8_t *optptr, int len)
     211{
     212  uint8_t *end = optptr + len;
     213  uint8_t type = 0;
    214214
    215215  while(optptr < end) {
     
    242242}
    243243/*---------------------------------------------------------------------------*/
    244 static u8_t
     244static uint8_t
    245245parse_msg(struct dhcpc_state *s)
    246246{
     
    386386dhcpc_request(struct dhcpc_state *s)
    387387{
    388   u16_t ipaddr[2];
     388  uint16_t ipaddr[2];
    389389
    390390  s->state = STATE_REQUEST;
  • uKadecot/trunk/uip/apps/dhcpc/dhcpc.h

    r108 r158  
    3434#define __DHCPC_H__
    3535
    36 #include "timer.h"
    37 #include "pt.h"
     36#include "sys/timer.h"
     37#include "sys/pt.h"
    3838
    3939struct dhcpc_state {
     
    4242  struct uip_udp_conn *conn;
    4343  struct uip_timer timer;
    44   u16_t ticks;
     44  uint16_t ticks;
    4545  const void *mac_addr;
    4646  int mac_len;
    4747
    48   u8_t serverid[4];
     48  uint8_t serverid[4];
    4949
    50   u16_t lease_time[2];
    51   u16_t ipaddr[2];
    52   u16_t netmask[2];
    53   u16_t dnsaddr[2];
    54   u16_t default_router[2];
     50  uint16_t lease_time[2];
     51  uint16_t ipaddr[2];
     52  uint16_t netmask[2];
     53  uint16_t dnsaddr[2];
     54  uint16_t default_router[2];
    5555};
    5656
  • uKadecot/trunk/uip/apps/webserver/http_parser.c

    r108 r158  
    2222 * IN THE SOFTWARE.
    2323 */
    24 #include "http_parser.h"
     24#include "webserver/http_parser.h"
    2525//#include <assert.h>
    2626#include <stddef.h>
  • uKadecot/trunk/uip/apps/webserver/http_pcb.h

    r108 r158  
    2323#define __HTTP_PCB_H__
    2424
    25 #include "http_parser.h"
     25#include "webserver/http_parser.h"
    2626
    2727#define MAX_ELEMENT_SIZE 256
  • uKadecot/trunk/uip/apps/webserver/httpd-fs.h

    r155 r158  
    5454#ifdef HTTPD_FS_STATISTICS
    5555#if HTTPD_FS_STATISTICS == 1
    56 u16_t httpd_fs_count(char *name);
     56uint16_t httpd_fs_count(char *name);
    5757#endif /* HTTPD_FS_STATISTICS */
    5858#endif /* HTTPD_FS_STATISTICS */
  • uKadecot/trunk/uip/apps/webserver/httpd.c

    r156 r158  
    5656 */
    5757
    58 #include "uip.h"
     58#include "net/ip/uip.h"
    5959#include "httpd.h"
    6060#include "httpd-fs.h"
  • uKadecot/trunk/uip/apps/webserver/httpd.h

    r156 r158  
    3636#define __HTTPD_H__
    3737
    38 #include "psock.h"
     38#include "net/ip/psock.h"
    3939#include "httpd-fs.h"
    4040#include "http_pcb.h"
     
    7676
    7777void httpd_log(char *msg);
    78 void httpd_log_file(u16_t *requester, char *file);
     78void httpd_log_file(uint16_t *requester, char *file);
    7979
    8080#endif /* __HTTPD_H__ */
  • uKadecot/trunk/uip/apps/webserver/websocket.c

    r148 r158  
    3838#include <string.h>
    3939#include "websocket.h"
    40 #include "uip.h"
     40#include "net/ip/uip.h"
    4141#include "kernel.h"
    4242#include "kernel_cfg.h"
     
    6969{
    7070        ws_state_t *s = &ws->rstate;
    71         const u8_t *pos = (const u8_t *)data, *end = &((const u8_t *)data)[len];
     71        const uint8_t *pos = (const uint8_t *)data, *end = &((const uint8_t *)data)[len];
    7272
    7373        for(; pos < end; pos++){
     
    192192{
    193193        ws_state_t *s = &ws->wstate;
    194         u8_t *pos = (u8_t *)data, *end = &((u8_t *)data)[len];
     194        uint8_t *pos = (uint8_t *)data, *end = &((uint8_t *)data)[len];
    195195
    196196        for(; pos < end; pos++){
Note: See TracChangeset for help on using the changeset viewer.