summaryrefslogtreecommitdiffstats
path: root/cpukit/libnetworking/lib
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2004-03-29 22:11:51 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2004-03-29 22:11:51 +0000
commitd8dbdc02cfbb73fbab709dd092a0f0937456b4bb (patch)
tree001cefb31b81cec83af953e71c164874837130cb /cpukit/libnetworking/lib
parent2004-03-29 Ralf Corsepius <ralf_corsepius@rtems.org> (diff)
downloadrtems-d8dbdc02cfbb73fbab709dd092a0f0937456b4bb.tar.bz2
2004-03-29 Ralf Corsepius <ralf_corsepius@rtems.org>
* libnetworking/lib/ftpfs.c, libnetworking/lib/rtems_bsdnet_ntp.c, libnetworking/lib/tftpDriver.c, libnetworking/machine/endian.h, libnetworking/net/if_ppp.c, libnetworking/rtems/rtems_bsdnet.h, libnetworking/rtems/rtems_bsdnet_internal.h, libnetworking/rtems/rtems_glue.c, libnetworking/rtems/rtems_syscall.c: Convert to using c99 fixed size types.
Diffstat (limited to 'cpukit/libnetworking/lib')
-rw-r--r--cpukit/libnetworking/lib/ftpfs.c12
-rw-r--r--cpukit/libnetworking/lib/rtems_bsdnet_ntp.c16
-rw-r--r--cpukit/libnetworking/lib/tftpDriver.c42
3 files changed, 35 insertions, 35 deletions
diff --git a/cpukit/libnetworking/lib/ftpfs.c b/cpukit/libnetworking/lib/ftpfs.c
index 8a6769f2de..a89a316e76 100644
--- a/cpukit/libnetworking/lib/ftpfs.c
+++ b/cpukit/libnetworking/lib/ftpfs.c
@@ -520,8 +520,8 @@ int rtems_ftp_eval_path(
int rtems_ftp_open(
rtems_libio_t *iop,
const char *new_name,
- unsigned32 flag,
- unsigned32 mode
+ uint32_t flag,
+ uint32_t mode
)
{
int s = 0;
@@ -530,8 +530,8 @@ int rtems_ftp_open(
char *upass = NULL;
char *hostname = NULL;
char port_buffer[sizeof(FTP_PORT_CMD)+6*4+1+1];
- rtems_unsigned32 my_ip;
- rtems_unsigned16 my_port;
+ uint32_t my_ip;
+ uint16_t my_port;
int eno = 0;
rtems_status_code rc;
rtems_boolean is_write = FALSE;
@@ -962,7 +962,7 @@ int rtems_ftp_open(
ssize_t rtems_ftp_read(
rtems_libio_t *iop,
void *buffer,
- unsigned32 count
+ uint32_t count
)
{
int eno = 0;
@@ -1016,7 +1016,7 @@ ssize_t rtems_ftp_read(
ssize_t rtems_ftp_write(
rtems_libio_t *iop,
const void *buffer,
- unsigned32 count
+ uint32_t count
)
{
int eno = EIO;
diff --git a/cpukit/libnetworking/lib/rtems_bsdnet_ntp.c b/cpukit/libnetworking/lib/rtems_bsdnet_ntp.c
index 87514bd14c..50386a2376 100644
--- a/cpukit/libnetworking/lib/rtems_bsdnet_ntp.c
+++ b/cpukit/libnetworking/lib/rtems_bsdnet_ntp.c
@@ -35,17 +35,17 @@
#define UNIX_BASE_TO_NTP_BASE (((70UL*365UL)+17UL) * (24*60*60))
struct timestamp {
- rtems_unsigned32 integer;
- rtems_unsigned32 fraction;
+ uint32_t integer;
+ uint32_t fraction;
};
struct ntpPacketSmall {
- rtems_unsigned8 li_vn_mode;
- rtems_unsigned8 stratum;
- rtems_signed8 poll_interval;
- rtems_signed8 precision;
- rtems_signed32 root_delay;
- rtems_signed32 root_dispersion;
+ uint8_t li_vn_mode;
+ uint8_t stratum;
+ int8_t poll_interval;
+ int8_t precision;
+ int32_t root_delay;
+ int32_t root_dispersion;
char reference_identifier[4];
struct timestamp reference_timestamp;
struct timestamp originate_timestamp;
diff --git a/cpukit/libnetworking/lib/tftpDriver.c b/cpukit/libnetworking/lib/tftpDriver.c
index 6ab6c44659..9b60eafc90 100644
--- a/cpukit/libnetworking/lib/tftpDriver.c
+++ b/cpukit/libnetworking/lib/tftpDriver.c
@@ -83,7 +83,7 @@ union tftpPacket {
* RRQ/WRQ packet
*/
struct tftpRWRQ {
- rtems_unsigned16 opcode;
+ uint16_t opcode;
char filename_mode[TFTP_BUFSIZE];
} tftpRWRQ;
@@ -91,25 +91,25 @@ union tftpPacket {
* DATA packet
*/
struct tftpDATA {
- rtems_unsigned16 opcode;
- rtems_unsigned16 blocknum;
- rtems_unsigned8 data[TFTP_BUFSIZE];
+ uint16_t opcode;
+ uint16_t blocknum;
+ uint8_t data[TFTP_BUFSIZE];
} tftpDATA;
/*
* ACK packet
*/
struct tftpACK {
- rtems_unsigned16 opcode;
- rtems_unsigned16 blocknum;
+ uint16_t opcode;
+ uint16_t blocknum;
} tftpACK;
/*
* ERROR packet
*/
struct tftpERROR {
- rtems_unsigned16 opcode;
- rtems_unsigned16 errorCode;
+ uint16_t opcode;
+ uint16_t errorCode;
char errorMessage[TFTP_BUFSIZE];
} tftpERROR;
};
@@ -126,7 +126,7 @@ struct tftpStream {
/*
* Last block number transferred
*/
- rtems_unsigned16 blocknum;
+ uint16_t blocknum;
/*
* Data transfer socket
@@ -289,8 +289,8 @@ sendStifle (struct tftpStream *tp, struct sockaddr_in *to)
{
int len;
struct {
- rtems_unsigned16 opcode;
- rtems_unsigned16 errorCode;
+ uint16_t opcode;
+ uint16_t errorCode;
char errorMessage[12];
} msg;
@@ -539,8 +539,8 @@ static int rtems_tftp_eval_path(
static int rtems_tftp_open_worker(
rtems_libio_t *iop,
char *full_path_name,
- unsigned32 flags,
- unsigned32 mode
+ uint32_t flags,
+ uint32_t mode
)
{
struct tftpStream *tp;
@@ -710,7 +710,7 @@ static int rtems_tftp_open_worker(
&& (ntohs (tp->pkbuf.tftpDATA.blocknum) == 1)) {
tp->nused = 0;
tp->blocknum = 1;
- tp->nleft = len - 2 * sizeof (rtems_unsigned16);
+ tp->nleft = len - 2 * sizeof (uint16_t );
tp->eof = (tp->nleft < TFTP_BUFSIZE);
if (sendAck (tp) != 0) {
close (tp->socket);
@@ -752,8 +752,8 @@ static int rtems_tftp_open_worker(
static int rtems_tftp_open(
rtems_libio_t *iop,
const char *new_name,
- unsigned32 flags,
- unsigned32 mode
+ uint32_t flags,
+ uint32_t mode
)
{
char *full_path_name;
@@ -794,7 +794,7 @@ static int rtems_tftp_open(
static ssize_t rtems_tftp_read(
rtems_libio_t *iop,
void *buffer,
- unsigned32 count
+ uint32_t count
)
{
char *bp;
@@ -834,11 +834,11 @@ static ssize_t rtems_tftp_read(
int len = getPacket (tp, retryCount);
if (len >= (int)sizeof tp->pkbuf.tftpACK) {
int opcode = ntohs (tp->pkbuf.tftpDATA.opcode);
- rtems_unsigned16 nextBlock = tp->blocknum + 1;
+ uint16_t nextBlock = tp->blocknum + 1;
if ((opcode == TFTP_OPCODE_DATA)
&& (ntohs (tp->pkbuf.tftpDATA.blocknum) == nextBlock)) {
tp->nused = 0;
- tp->nleft = len - 2 * sizeof (rtems_unsigned16);
+ tp->nleft = len - 2 * sizeof (uint16_t );
tp->eof = (tp->nleft < TFTP_BUFSIZE);
tp->blocknum++;
if (sendAck (tp) != 0)
@@ -869,7 +869,7 @@ static int rtems_tftp_flush ( struct tftpStream *tp )
int wlen, rlen;
int retryCount = 0;
- wlen = tp->nused + 2 * sizeof (rtems_unsigned16);
+ wlen = tp->nused + 2 * sizeof (uint16_t );
for (;;) {
tp->pkbuf.tftpDATA.opcode = htons (TFTP_OPCODE_DATA);
tp->pkbuf.tftpDATA.blocknum = htons (tp->blocknum);
@@ -935,7 +935,7 @@ static int rtems_tftp_close(
static ssize_t rtems_tftp_write(
rtems_libio_t *iop,
const void *buffer,
- unsigned32 count
+ uint32_t count
)
{
const char *bp;