summaryrefslogtreecommitdiffstats
path: root/c/src/lib/include
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1997-04-09 14:05:50 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1997-04-09 14:05:50 +0000
commite2d795597310f976af211f9bac2466dbf89b50c8 (patch)
tree7d3053fa42d08569c75a1add4c5715a5fc8ff4fa /c/src/lib/include
parentadded cast to eliminate warning. (diff)
downloadrtems-e2d795597310f976af211f9bac2466dbf89b50c8.tar.bz2
Added ka9q tcpip stack and network driver for the gen68360. This effort
was done based on the 3.6.0 release and had to be autoconf'ed locally. It is turned on is the bsp enables it and it is not explicitly disabled via the configure option --disable-tcpip. As many warnings as possible were removed locally after the code was merged. Only the gen68360 and mvme136 bsps were compiled this way. The ka9q port and network driver were submitted by Eric Norum (eric@skatter.USask.Ca). The network demo programs are not included in the tree at this point.
Diffstat (limited to 'c/src/lib/include')
-rw-r--r--c/src/lib/include/Makefile.in20
-rw-r--r--c/src/lib/include/rtems/libio.h22
2 files changed, 36 insertions, 6 deletions
diff --git a/c/src/lib/include/Makefile.in b/c/src/lib/include/Makefile.in
index 60dad03bc6..092b7c9766 100644
--- a/c/src/lib/include/Makefile.in
+++ b/c/src/lib/include/Makefile.in
@@ -7,14 +7,20 @@ srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
-H_FILES=console.h clockdrv.h iosupp.h ringbuf.h \
- spurious.h timerdrv.h vmeintr.h z8036.h z8530.h z8536.h
+H_PIECES=console clockdrv iosupp ringbuf \
+ spurious timerdrv vmeintr z8036 z8530 z8536
+H_FILES=$(H_PIECES:%=$(srcdir)/%.h)
-HH_FILES=$(H_FILES:%=$(srcdir)/%)
+KA9Q_H_PIECES= arp asy ax25 ax25mail bootp cmdparse commands config \
+ daemon dialer domain enet ftp ftpcli global hardware icmp iface \
+ internet ip kiss lapb lzw mailbox mbuf netuser nospc nr4 nr4mail \
+ nrs ping pktdrvr ppp proc rip rtems_ka9q sb session slhc slip smtp \
+ sockaddr socket tcp telnet tftp timer tipmail trace udp usock
+KA9Q_H_FILES=$(KA9Q_H_PIECES:%=$(srcdir)/ka9q/%.h)
SYS_H_FILES=
-SRCS=$(HH_FILES) $(SYS_H_FILES)
+SRCS=$(H_FILES) $(SYS_H_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
@@ -23,6 +29,8 @@ CLEAN_ADDITIONS +=
CLOBBER_ADDITIONS +=
all: $(SRCS)
- $(INSTALL) -m 444 $(HH_FILES) ${PROJECT_RELEASE}/include
+ $(INSTALL) -m 444 $(H_FILES) ${PROJECT_RELEASE}/include
$(INSTALL) -m 444 $(SYS_H_FILES) ${PROJECT_RELEASE}/include/sys
-
+ifeq ($(HAS_KA9Q),yes)
+ $(INSTALL) -m 444 $(KA9Q_H_FILES) ${PROJECT_RELEASE}/include/ka9q
+endif
diff --git a/c/src/lib/include/rtems/libio.h b/c/src/lib/include/rtems/libio.h
index b518100484..c79dfc2e33 100644
--- a/c/src/lib/include/rtems/libio.h
+++ b/c/src/lib/include/rtems/libio.h
@@ -99,4 +99,26 @@ int __rtems_lseek(int fd, rtems_libio_offset_t offset, int whence);
int __rtems_fstat(int _fd, struct stat* _sbuf);
int __rtems_isatty(int _fd);
+/*
+ * External I/O handlers
+ */
+typedef struct {
+ int (*open)(const char *pathname, unsigned32 flag, unsigned32 mode);
+ int (*close)(int fd);
+ int (*read)(int fd, void *buffer, unsigned32 count);
+ int (*write)(int fd, const void *buffer, unsigned32 count);
+ int (*ioctl)(int fd, unsigned32 command, void *buffer);
+ int (*lseek)(int fd, rtems_libio_offset_t offset, int whence);
+} rtems_libio_handler_t;
+
+void rtems_register_libio_handler(int handler_flag,
+ const rtems_libio_handler_t *handler);
+
+#define RTEMS_FILE_DESCRIPTOR_TYPE_FILE 0x0000
+#define RTEMS_FILE_DESCRIPTOR_TYPE_SOCKET 0x1000
+#define rtems_make_file_descriptor(fd,flags) ((fd)|(flags))
+#define rtems_file_descriptor_base(fd) ((fd) & 0x0FFF)
+#define rtems_file_descriptor_type(fd) ((fd) & 0xF000)
+#define rtems_file_descriptor_type_index(fd) ((((fd) & 0xF000) >> 12) - 1)
+
#endif /* _RTEMS_LIBIO_H */