Slightly outdated versions were imported to sf.
This commit is contained in:
parent
8ed2e44003
commit
4eee7b8bf4
|
@ -28,7 +28,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* @(#)$Id: tcp_loader.c,v 1.1 2006/06/18 07:44:36 adamdunkels Exp $
|
* @(#)$Id: tcp_loader.c,v 1.2 2006/08/02 14:33:37 bg- Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -75,7 +75,7 @@ PT_THREAD(recv_tcpthread(struct pt *pt))
|
||||||
uip_appdata += sizeof(struct codeprop_tcphdr);
|
uip_appdata += sizeof(struct codeprop_tcphdr);
|
||||||
uip_len -= sizeof(struct codeprop_tcphdr);
|
uip_len -= sizeof(struct codeprop_tcphdr);
|
||||||
|
|
||||||
xmem_erase(s.len, EEPROMFS_ADDR_CODEPROP);
|
xmem_erase(XMEM_ERASE_UNIT_SIZE, EEPROMFS_ADDR_CODEPROP);
|
||||||
|
|
||||||
/* Read the rest of the data. */
|
/* Read the rest of the data. */
|
||||||
do {
|
do {
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* @(#)$Id: cc2420.c,v 1.1 2006/06/17 22:41:16 adamdunkels Exp $
|
* @(#)$Id: cc2420.c,v 1.2 2006/08/02 14:33:36 bg- Exp $
|
||||||
*/
|
*/
|
||||||
/*
|
/*
|
||||||
* This code is almost device independent and should be possible to
|
* This code is almost device independent and should be possible to
|
||||||
|
@ -566,15 +566,7 @@ PROCESS_THREAD(cc2420_retransmit_process, ev, data)
|
||||||
#define MAX_EXPIRE 15
|
#define MAX_EXPIRE 15
|
||||||
#define AGE_INTERVAL 5 /* 20 seconds */
|
#define AGE_INTERVAL 5 /* 20 seconds */
|
||||||
|
|
||||||
struct cc2420_neigbour {
|
struct cc2420_neigbour neigbours[NNEIGBOURS];
|
||||||
unsigned mac:16, nretrans:4, expire:4; /* expiration time */
|
|
||||||
#if 0
|
|
||||||
unsigned rssi:6, correlation:6;
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
#define NNEIGBOURS 16
|
|
||||||
static struct cc2420_neigbour neigbours[NNEIGBOURS];
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Double hash into 3 different positions using a constand step. If we
|
* Double hash into 3 different positions using a constand step. If we
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* @(#)$Id: cc2420.h,v 1.1 2006/06/17 22:41:16 adamdunkels Exp $
|
* @(#)$Id: cc2420.h,v 1.2 2006/08/02 14:33:37 bg- Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CC2420_H
|
#ifndef CC2420_H
|
||||||
|
@ -94,6 +94,16 @@ struct hdr_802_15_ack {
|
||||||
/* no more */
|
/* no more */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
struct cc2420_neigbour {
|
||||||
|
unsigned mac:16, nretrans:4, expire:4; /* expiration time */
|
||||||
|
#if 0
|
||||||
|
unsigned rssi:6, correlation:6;
|
||||||
|
#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
#define NNEIGBOURS 16
|
||||||
|
extern struct cc2420_neigbour neigbours[NNEIGBOURS];
|
||||||
|
|
||||||
PROCESS_NAME(cc2420_process);
|
PROCESS_NAME(cc2420_process);
|
||||||
|
|
||||||
extern struct uip_fw_netif cc2420if;
|
extern struct uip_fw_netif cc2420if;
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
*
|
*
|
||||||
* This file is part of the Contiki operating system.
|
* This file is part of the Contiki operating system.
|
||||||
*
|
*
|
||||||
* @(#)$Id: codeprop.c,v 1.1 2006/06/18 08:16:12 adamdunkels Exp $
|
* @(#)$Id: codeprop.c,v 1.2 2006/08/02 14:33:37 bg- Exp $
|
||||||
*/
|
*/
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
@ -92,7 +92,7 @@ main(int argc, char **argv) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
{
|
while(1) {
|
||||||
char buf[64000];
|
char buf[64000];
|
||||||
int len;
|
int len;
|
||||||
|
|
||||||
|
@ -116,17 +116,12 @@ main(int argc, char **argv) {
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
total += len;
|
total += len;
|
||||||
|
|
||||||
buf[0] = len >> 8;
|
buf[0] = len >> 8;
|
||||||
buf[1] = len & 0xff;
|
buf[1] = len & 0xff;
|
||||||
if(write(s, buf, len + 2) == -1) {
|
if(write(s, buf, len + 2) == -1) {
|
||||||
perror("network send failed");
|
perror("network send failed");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
printf("File sent\n");
|
|
||||||
len = read(s, buf, sizeof(buf));
|
|
||||||
buf[len] = 0;
|
|
||||||
printf("%s", buf);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in a new issue