Commit Graph

816 Commits

Author SHA1 Message Date
Alex Ivanov
3cf4031c19 Header File Doxygen Enhancement Task #1 2012-12-28 17:48:12 -06:00
Sebastian Huber
1edaa5fe7b libnetworking: Make functions public
Make functions rtems_bsdnet_semaphore_obtain_recursive() and
rtems_bsdnet_semaphore_release_recursive() public.
2012-12-18 11:22:17 +01:00
Sebastian Huber
82eb2c4d5f ftpfs: Fix NULL pointer access 2012-11-22 16:35:06 +01:00
Sebastian Huber
fe0f24ea39 ftpfs: Use SIZE command 2012-11-21 16:38:34 +01:00
Sebastian Huber
ad5e0708a2 ftpfs: Open control connection during path eval 2012-11-21 16:38:34 +01:00
Sebastian Huber
be6f505df7 ftpfs: Format 2012-11-21 16:38:34 +01:00
Sebastian Huber
3fbcadfbf7 libnetworking: Use rtems_clock_get_uptime_seconds
This reduces the start-up time of the network stack.

With a 1ms tick the ticks since boot value overflows after approximately
50 days.  This problem is avoided with the
rtems_clock_get_uptime_seconds() function.
2012-11-21 16:29:41 +01:00
Sebastian Huber
94eb1bb342 libnetworking: Use rtems_clock_get_uptime_timeval 2012-11-21 16:29:41 +01:00
Sebastian Huber
8cbd90c51c libnetworking: Disconnect after mbuf shortage
The missing disconnect left the socket in an unusable state.  Each send
request resulted in an EISCONN error.
2012-11-05 11:01:41 +01:00
Sebastian Huber
b3cee28a51 libnetworking: Avoid deadlock during starvation 2012-11-02 16:06:57 +01:00
Sebastian Huber
26e90fb1c6 libnetworking: Use system events
Add reserved system events RTEMS_EVENT_SYSTEM_NETWORK_SBWAIT and
RTEMS_EVENT_SYSTEM_NETWORK_SOSLEEP.

Add and use rtems_bsdnet_event_send().
2012-11-02 09:34:35 +01:00
Sebastian Huber
38feeefd17 libnetworking: Silence set but not used warnings 2012-07-17 14:22:12 +02:00
Sebastien Bourdeauducq
6c18c97be0 network/bootp: PR2031: Add and use header file 2012-06-06 13:30:14 +02:00
Sebastien Bourdeauducq
7aba2ea4a8 network/dhcp: PR1841: Fix DNS processing in DHCP 2012-05-22 14:47:15 +02:00
Sebastian Huber
0a95800a58 Filesystem: Change pathconf_limits_and_options
The pathconf_limits_and_options field of
rtems_filesystem_mount_table_entry_t is now a const pointer to reduce
the read-write memory demands of file system instances.
2012-05-15 10:37:00 +02:00
Sebastian Huber
da154e14f6 Filesystem: Move operations to mount table entry
The scope of the file system operations is the file system instance.
The scope of the file system node handlers is the file location.  The
benefit of moving the operations to the mount table entry is a size
reduction of the file location (rtems_filesystem_location_info_t).  The
code size is slightly increased due to additional load instructions.

Restructure rtems_filesystem_mount_table_entry_t to improve cache
efficiency.
2012-05-15 10:01:43 +02:00
Sebastian Huber
df01da6707 Filesystem: Use ioctl_command_t 2012-05-15 10:01:42 +02:00
Joel Sherrill
65c6425de9 Remove CVS Id Strings (manual edits after script)
These modifications were required by hand after running the script.
In some cases, the file names did not match patterns. In others,
the format of the file did not match any common patterns.
2012-05-11 08:44:14 -05:00
Joel Sherrill
9b4422a251 Remove All CVS Id Strings Possible Using a Script
Script does what is expected and tries to do it as
smartly as possible.

+ remove occurrences of two blank comment lines
  next to each other after Id string line removed.
+ remove entire comment blocks which only exited to
  contain CVS Ids
+ If the processing left a blank line at the top of
  a file, it was removed.
2012-05-11 08:44:13 -05:00
Joel Sherrill
33a105fb69 Revert: Remove CVS Ids
See http://www.rtems.org/pipermail/rtems-devel/2012-May/001006.html
for details.
2012-05-07 11:08:48 -05:00
Ralf Corsépius
ee32f67a6f Remove CVS-Ids. 2012-05-04 09:36:25 +02:00
Sebastian Huber
58f665583e networking: socket to/from file descriptor
o Move rtems_bsdnet_fdToSocket() and rtems_bsdnet_makeFdForSocket() to
   "cpukit/libnetworking/rtems/rtems_syscall.c".
 o The rtems_bsdnet_makeFdForSocket() function is now static.
 o Check in rtems_bsdnet_fdToSocket() function that the file descriptor
   uses the socket handlers, otherwise an error status will be returned
   and errno set to ENOTSOCK.
 o New test libtests/syscall01.
2012-04-03 16:21:23 +02:00
Sebastian Huber
2563410019 Filesystem: Rename defines
o Removed RTEMS_LIBIO_PERMS_SEARCH.
 o Renamed RTEMS_LIBIO_PERMS_READ in RTEMS_FS_PERMS_READ.
 o Renamed RTEMS_LIBIO_PERMS_WRITE in RTEMS_FS_PERMS_WRITE.
 o Renamed RTEMS_LIBIO_PERMS_EXEC in RTEMS_FS_PERMS_EXEC.
 o Renamed RTEMS_LIBIO_FOLLOW_HARD_LINK in RTEMS_FS_FOLLOW_HARD_LINK.
 o Renamed RTEMS_LIBIO_FOLLOW_SYM_LINK in RTEMS_FS_FOLLOW_SYM_LINK.
 o Renamed RTEMS_LIBIO_MAKE in RTEMS_FS_MAKE.
 o Renamed RTEMS_LIBIO_EXCLUSIVE in RTEMS_FS_EXCLUSIVE.
 o Renamed RTEMS_LIBIO_ACCEPT_RESIDUAL_DELIMITERS in
   RTEMS_FS_ACCEPT_RESIDUAL_DELIMITERS.
 o Renamed RTEMS_LIBIO_REJECT_TERMINAL_DOT in
 RTEMS_FS_REJECT_TERMINAL_DOT.
2012-03-13 12:24:10 +01:00
Sebastian Huber
4116fce629 Filesystem: New defaults fsync_h and fdatasync_h
New defaults rtems_filesystem_default_fsync_or_fdatasync() and
rtems_filesystem_default_fsync_or_fdatasync_success() for fsync_h and
fdatasync_h.  The rtems_filesystem_default_fsync_or_fdatasync() sets now
errno to EINVAL according to POSIX.
2012-03-13 12:23:45 +01:00
Sebastian Huber
3b7c123c8d Filesystem: Reference counting for locations
o A new data structure rtems_filesystem_global_location_t was
   introduced to be used for
    o the mount point location in the mount table entry,
    o the file system root location in the mount table entry,
    o the root directory location in the user environment, and
    o the current directory location in the user environment.
   During the path evaluation global start locations are obtained to
   ensure that the current file system instance will be not unmounted in
   the meantime.
 o The user environment uses now reference counting and is protected
   from concurrent access.
 o The path evaluation process was completely rewritten and simplified.
   The IMFS, RFS, NFS, and DOSFS use now a generic path evaluation
   method.  Recursive calls in the path evaluation have been replaced
   with iteration to avoid stack overflows.  Only the evaluation of
   symbolic links is recursive.  No dynamic memory allocations and
   intermediate buffers are used in the high level path evaluation.  No
   global locks are held during the file system instance specific path
   evaluation process.
 o Recursive symbolic link evaluation is now limited by
   RTEMS_FILESYSTEM_SYMLOOP_MAX.  Applications can retrieve this value
   via sysconf().
 o The device file system (devFS) uses now no global variables and
   allocation from the workspace.  Node names are allocated from the
   heap.
 o The upper layer lseek() performs now some parameter checks.
 o The upper layer ftruncate() performs now some parameter checks.
 o unmask() is now restricted to the RWX flags and protected from
   concurrent access.
 o The fchmod_h and rmnod_h file system node handlers are now a file
   system operation.
 o The unlink_h operation has been removed.  All nodes are now destroyed
   with the rmnod_h operation.
 o New lock_h, unlock_h, clonenod_h, and are_nodes_equal_h file system
   operations.
 o The path evaluation and file system operations are now protected by
   per file system instance lock and unlock operations.
 o Fix and test file descriptor duplicate in fcntl().
 o New test fstests/fsnofs01.
2012-03-13 12:23:37 +01:00
Ralf Corsépius
7f2036aa35 2012-03-02 Ralf Corsépius <ralf.corsepius@rtems.org>
* libnetworking/resolv.h: Partial sync with FreeBSD.
	Add decls for res_send_setqhook, res_send_setrhook.
2012-03-02 13:03:35 +01:00
Ralf Corsépius
396b80ebf6 2012-03-02 Ralf Corsépius <ralf.corsepius@rtems.org>
* configure.ac: Check for rcmd in unistd.h.
	* libnetworking/libc/rcmd.c: Build iff rcmd is declared in unistd.h.
	Change rcmd's decl to match with Linux/FreeBSD's decl.
2012-03-02 09:40:03 +01:00
Sebastian Huber
f14327a24d Fixed incorrect error path
The inet_aton() function returns non-zero in case of success.
2012-02-15 10:02:50 +01:00
Sebastian Huber
8c85ca3f30 Avoid buffer overflow and misaligned memory access 2012-02-14 16:46:53 +01:00
Sebastian Huber
1052242d23 Removed fpathconf file system node handler.
There existed no calling function for this handler.
2012-02-02 15:55:33 +01:00
Joel Sherrill
61250b4ce9 Remove all .cvsignore files. 2012-02-01 10:59:44 -06:00
Ralf Corsepius
5605990592 2011-12-08 Ralf Corsépius <ralf.corsepius@rtems.org>
* libnetworking/rtems/rtems_dhcp.c:
	Make format_ip, dhcp_init static.
	* libnetworking/nfs/bootp_subr.c:
	Make bootp_strdup_realloc static.
2011-12-08 05:09:04 +00:00
Ralf Corsepius
a1399ba8cd 2011-12-07 Ralf Corsépius <ralf.corsepius@rtems.org>
PR 1983/networking
	* libnetworking/libc/gethostbyht.c (gethostent_r):
	Abort if (!hostf).
2011-12-07 06:49:32 +00:00
Ralf Corsepius
5876a99902 2011-12-07 Ralf Corsépius <ralf.corsepius@rtems.org>
* libnetworking/libc/ns_parse.c (ns_parserr):
	Comment out if ( section < 0 ) (type is unsigned).
2011-12-07 06:46:19 +00:00
Ralf Corsepius
ce373088e9 2011-12-07 Ralf Corsépius <ralf.corsepius@rtems.org>
* libnetworking/libc/gethostbydns.c: Comment out __dns_getanswer
	(Unused).
2011-12-07 05:19:07 +00:00
Ralf Corsepius
a7fa55cae1 2011-12-01 Ralf Corsépius <ralf.corsepius@rtems.org>
* libnetworking/rtems/mkrootfs.c: Use mode_t for modes,
	Use size_t for sizes.
2011-12-01 08:26:49 +00:00
Ralf Corsepius
4aa59b1adc 2011-11-30 Ralf Corsépius <ralf.corsepius@rtems.org>
* libnetworking/rtems/rtems_dhcp.c (dhcp_init):
	Remove unused var "len".
2011-11-30 05:30:49 +00:00
Ralf Corsepius
984c4c492f 2011-11-06 Ralf Corsépius <ralf.corsepius@rtems.org>
PR1945/cpukit
	* libfs/src/nfsclient/src/nfs.c, libfs/src/rfs/rtems-rfs-rtems-dev.c,
	libfs/src/rfs/rtems-rfs-rtems-dir.c,
	libfs/src/rfs/rtems-rfs-rtems-file.c, libnetworking/lib/ftpfs.c,
	libnetworking/lib/tftpDriver.c: Replace rtems_off64_t with off_t.
2011-11-06 12:00:04 +00:00
Ralf Corsepius
9356119583 2011-10-20 Ralf Corsépius <ralf.corsepius@rtems.org>
* libnetworking/net/if_ethersubr.c (ether_output):
	Remove unused vars "hlen", "off".
2011-10-20 13:54:45 +00:00
Ralf Corsepius
9c337c655b 2011-10-20 Ralf Corsépius <ralf.corsepius@rtems.org>
* libnetworking/libc/res_mkupdate.c (res_mkupdate):
	Remove unused var "sp1".
2011-10-20 10:52:59 +00:00
Ralf Corsepius
7c77085658 2011-10-18 Ralf Corsépius <ralf.corsepius@rtems.org>
* libnetworking/rtems/rtems_dhcp.c: Remove unused var
	"disconnected".
2011-10-18 09:01:23 +00:00
Ralf Corsepius
75e454c0f8 2011-10-02 Ralf Corsépius <ralf.corsepius@rtems.org>
* libnetworking/libc/res_comp.c: Eliminate unused var "ppch".
2011-10-02 05:23:46 +00:00
Sebastian Huber
add4f336fb 2011-07-21 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libnetworking/rtems/rtems_showipstat.c: Print IP input queue drops.
2011-07-21 15:35:13 +00:00
Sebastian Huber
8f6ef47836 2011-07-18 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libnetworking/lib/ftpfs.c: Fixed reply parsing.
2011-07-18 15:25:33 +00:00
Joel Sherrill
067489b904 2011-07-14 Gene Smith <gene.smith@siemens.com>
PR 1381/networking
	* libnetworking/netinet/ip_output.c: If a null or unreachable gateway
	is specified either statically in networkconfig.h or from dhcp/bootp,
	sendto() fails on multicast send with errno 118 Host
2011-07-14 19:16:09 +00:00
Sebastian Huber
9f816ad4dc 2011-07-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libnetworking/rtems/tftp.h, libnetworking/lib/tftpDriver.c: Fixed
	prototype.
2011-07-07 06:55:48 +00:00
Joel Sherrill
21242c252a 2011-06-24 Joel Sherrill <joel.sherrill@oarcorp.com>
* include/rtems/bspIo.h, include/rtems/concat.h,
	include/rtems/endian.h, include/rtems/fs.h, include/rtems/irq.h,
	include/rtems/pci.h, include/rtems/userenv.h,
	libblock/include/rtems/flashdisk.h,
	libblock/include/rtems/nvdisk-sram.h,
	libblock/include/rtems/nvdisk.h, libcsupport/include/clockdrv.h,
	libcsupport/include/console.h, libcsupport/include/iosupp.h,
	libcsupport/include/spurious.h,
	libcsupport/include/motorola/mc68230.h,
	libcsupport/include/rtems/assoc.h, libcsupport/include/rtems/error.h,
	libcsupport/include/rtems/framebuffer.h,
	libcsupport/include/rtems/gxx_wrappers.h,
	libcsupport/include/rtems/libcsupport.h,
	libcsupport/include/rtems/libio_.h,
	libcsupport/include/rtems/malloc.h,
	libcsupport/include/rtems/termiostypes.h,
	libcsupport/include/sys/statvfs.h, libcsupport/include/sys/termios.h,
	libcsupport/include/sys/utsname.h, libcsupport/include/zilog/z8036.h,
	libcsupport/include/zilog/z8530.h, libcsupport/include/zilog/z8536.h,
	libfs/src/imfs/imfs.h, libfs/src/pipe/pipe.h,
	libmisc/capture/capture-cli.h, libmisc/capture/capture.h,
	libmisc/cpuuse/cpuuse.h, libmisc/devnull/devnull.h,
	libmisc/devnull/devzero.h, libmisc/dumpbuf/dumpbuf.h,
	libmisc/fb/fb.h, libmisc/fb/mw_uid.h, libmisc/mouse/mouse_parser.h,
	libmisc/shell/shellconfig.h, libmisc/stringto/stringto.h,
	libmisc/untar/untar.h, libnetworking/memory.h, posix/include/aio.h,
	posix/include/mqueue.h, posix/include/semaphore.h,
	posix/include/rtems/posix/aio_misc.h,
	posix/include/rtems/posix/barrier.h,
	posix/include/rtems/posix/cond.h, posix/include/rtems/posix/config.h,
	posix/include/rtems/posix/key.h, posix/include/rtems/posix/mqueue.h,
	posix/include/rtems/posix/mutex.h,
	posix/include/rtems/posix/posixapi.h,
	posix/include/rtems/posix/priority.h,
	posix/include/rtems/posix/psignal.h,
	posix/include/rtems/posix/pthread.h,
	posix/include/rtems/posix/ptimer.h,
	posix/include/rtems/posix/rwlock.h,
	posix/include/rtems/posix/semaphore.h,
	posix/include/rtems/posix/sigset.h,
	posix/include/rtems/posix/spinlock.h,
	posix/include/rtems/posix/threadsup.h,
	posix/include/rtems/posix/time.h, posix/include/rtems/posix/timer.h,
	posix/inline/rtems/posix/barrier.inl,
	posix/inline/rtems/posix/cond.inl,
	posix/inline/rtems/posix/mqueue.inl,
	posix/inline/rtems/posix/mutex.inl,
	posix/inline/rtems/posix/priority.inl,
	posix/inline/rtems/posix/pthread.inl,
	posix/inline/rtems/posix/rwlock.inl,
	posix/inline/rtems/posix/semaphore.inl,
	posix/inline/rtems/posix/spinlock.inl,
	posix/inline/rtems/posix/timer.inl, rtems/mainpage.h,
	rtems/include/rtems/rtems/barrier.h,
	rtems/include/rtems/rtems/object.h,
	rtems/include/rtems/rtems/timer.h,
	rtems/inline/rtems/rtems/barrier.inl,
	rtems/inline/rtems/rtems/timer.inl,
	rtems/src/semtranslatereturncode.c, sapi/include/rtems/config.h,
	sapi/include/rtems/fatal.h, sapi/include/rtems/mptables.h,
	score/include/rtems/score/object.h,
	score/include/rtems/score/priority.h,
	score/inline/rtems/score/object.inl,
	score/inline/rtems/score/priority.inl: Add @file Doxygen directives
	and descriptions to files which originated with RTEMS. This improves
	the file list page generated by Doxygen.
2011-06-24 17:52:58 +00:00
Ralf Corsepius
f73cdd5b6e 2011-05-18 Ralf Corsépius <ralf.corsepius@rtems.org>
* libnetworking/sys/signalvar.h: Cosmetics from FreeBSD.
	Comment out psignal().
2011-05-18 05:13:07 +00:00
Ralf Corsepius
77dc5a21a3 2011-05-16 Ralf Corsépius <ralf.corsepius@rtems.org>
* libnetworking/Makefile.am: Reformat.
	* librpc/Makefile.am: Reformat.
2011-05-17 14:30:34 +00:00
Ralf Corsepius
7d2e930f88 2011-05-16 Ralf Corsépius <ralf.corsepius@rtems.org>
* libnetworking/rtems/rtems_bsdnet_internal.h: Move
	#include <rtems.h> out of C++-guard.
2011-05-16 14:31:49 +00:00