summaryrefslogtreecommitdiffstats
path: root/cpukit/libnetworking/lib/tftpDriver.c (unfollow)
Commit message (Collapse)AuthorFilesLines
2021-04-07cpukit: Move ftpfs from libnetworking to libfsVijay Kumar Banerjee1-1066/+0
Update #3850
2018-12-21tftpfs: Some bug fixesThomas Dörfler1-10/+20
Fix for: - tftpfs did not mount, when device field in mount entry is empty - tftpfs needs to allocate fs structure before it fills it (avoid use of uninitialized pointer) - tftpfs needs to skip initial slash before hostname
2018-05-02tftpfs: Always build TFTP clientSebastian Huber1-4/+14
Move TFTP client filesystem to separate library libtftpfs.a. Conditionally use legacy network stack features, e.g. BOOTP support. Update #3419.
2018-02-07tftpfs: Use self-contained mutexSebastian Huber1-23/+9
Update #2843.
2017-07-14posix/mmap: Add support for file handler and MAP_ANONKevin Kirspel1-0/+1
Added a mmap file handler to struct _rtems_filesystem_file_handlers_r. Updated each file handler object to support the default mmap handler. Updated mmap() to call the mmap handler for MAP_SHARED. Added a mmap file handler for shm Added support for MAP_ANON in mmap(). Updates #2859
2016-06-06tftp: Use proper semaphore attr for mutexSebastian Huber1-4/+2
Close #2729.
2015-10-26basdefs.h: Add and use RTEMS_UNUSEDSebastian Huber1-2/+2
2015-07-29tftpDriver: close() false errorMichael Davidsaver1-1/+3
closes #2376.
2015-02-09Filesystem: Delete unused fsmountme_h handlerSebastian Huber1-1/+0
2015-01-22Filesystem: Delete node type operationSebastian Huber1-7/+8
Use the fstat handler instead.
2013-12-20Filesystem: Use default kqfilter and poll handlerSebastian Huber1-0/+2
2013-12-20Filesystem: Add readv/writev handlersSebastian Huber1-1/+3
The readv() and writev() support was implemented in terms of multiple calls to the read and write handlers. This imposes a problem on device files which use an IO vector as single request entity. For example a low-level network device (e.g. BPF(4)) may use an IO vector to create one frame from multiple protocol layers each with its own IO vector entry.
2012-05-15Filesystem: Move operations to mount table entrySebastian Huber1-1/+1
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-11Remove All CVS Id Strings Possible Using a ScriptJoel Sherrill1-2/+0
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-03-13Filesystem: Rename definesSebastian Huber1-2/+2
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-13Filesystem: New defaults fsync_h and fdatasync_hSebastian Huber1-2/+2
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-13Filesystem: Reference counting for locationsSebastian Huber1-189/+130
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-02-15Fixed incorrect error pathSebastian Huber1-2/+0
The inet_aton() function returns non-zero in case of success.
2012-02-02Removed fpathconf file system node handler.Sebastian Huber1-1/+0
There existed no calling function for this handler.
2011-11-062011-11-06 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius1-1/+1
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-07-072011-07-08 Sebastian Huber <sebastian.huber@embedded-brains.de>Sebastian Huber1-1/+1
* libnetworking/rtems/tftp.h, libnetworking/lib/tftpDriver.c: Fixed prototype.
2010-07-152010-07-16 Sebastian Huber <sebastian.huber@embedded-brains.de>Sebastian Huber1-30/+30
* libcsupport/include/rtems/libio_.h: Removed rtems_filesystem_null_handlers. * libcsupport/src/fs_null_handlers.c: Removed file. * libcsupport/Makefile.am: Reflect change above. * libfs/src/nfsclient/src/nfs.c, libfs/src/imfs/imfs_creat.c, libfs/src/imfs/imfs_init.c, libfs/src/imfs/miniimfs_init.c: Use rtems_filesystem_handlers_default instead of rtems_filesystem_null_handlers. * libnetworking/lib/ftpfs.c, libnetworking/lib/tftpDriver.c: Initialize handler and operations table with proper defaults.
2010-06-292010-06-29 Sebastian Huber <sebastian.huber@embedded-brains.de>Sebastian Huber1-4/+4
* libnetworking/lib/tftpDriver.c: rtems_tftp_ops and rtems_tftp_handlers are now const and static. * libnetworking/rtems/tftp.h: Removed rtems_bsdnet_initialize_tftp_filesystem and rtems_tftp_ops.
2010-05-312010-05-31 Chris Johns <chrisj@rtems.org>Chris Johns1-211/+278
* libcsupport/Makefile.am: Add mount-mgr.c. * libcsupport/src/mount-mgr.c: New. * include/rtems/fs.h: Added rtems_filesystem_location_mount. * libcsupport/include/rtems/libio.h, libcsupport/src/mount.c: New mount interface. It is similar to Linux. * libcsupport/include/rtems/libio_.h: Remove the init_fs_mount_table call. * libcsupport/src/base_fs.c: Remove init_fs_mount_table_call. Use the new mount call. Remove setting the root node in the global pathloc. Mount does this now. * libcsupport/src/privateenv.c: Remove the hack to set the root mount table entry in the environment. * libcsupport/src/unmount.cL Free the target string. * libblock/src/bdpart-mount.c: New mount API. * libfs/src/devfs/devfs.h, libfs/src/devfs/devfs_init.c, libfs/src/dosfs/dosfs.h, libfs/src/dosfs/msdos.h, libfs/src/dosfs/msdos_init.c, libfs/src/imfs/imfs.h, libfs/src/imfs/imfs_eval.c, libfs/src/imfs/imfs_init.c, libfs/src/imfs/miniimfs_init.c, libfs/src/nfsclient/src/librtemsNfs.h, libfs/src/rfs/rtems-rfs-rtems.c, libfs/src/rfs/rtems-rfs.h, libnetworking/lib/ftpfs.c, libnetworking/rtems/ftpfs.h, libnetworking/rtems/tftp.h: New mount_h API. * libfs/src/devfs/devfs_eval.c: Local include of extern ops. * libfs/src/nfsclient/src/nfs.c: New mount API. Removed the mount me call and fixed the initialisation to happen when mounting. * libmisc/Makefile.am, libmisc/shell/shellconfig.h: Remove mount filesystem files. * libmisc/fsmount/fsmount.c, libmisc/fsmount/fsmount.h: Updated to the new mount table values. * libmisc/shell/main_mount_ftp.c, libmisc/shell/main_mount_msdos.c, libmisc/shell/main_mount_rfs.c, libmisc/shell/main_mount_tftp.c: Removed. * libmisc/shell/main_mount.c: Use the new mount API. Also access the file system table for the file system types. * libnetworking/lib/tftpDriver.c: Updated to the new mount API. Fixed to allow mounting from any mount point. Also can now have more than file system mounted. * sapi/include/confdefs.h: Add file system configuration support.
2010-05-272010-05-27 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius1-1/+1
* libnetworking/lib/ftpfs.c, libnetworking/lib/tftpDriver.c: Use size_t instead of int for pathnamelen.
2010-03-28Add HAVE_CONFIG_H support to let files receive configure defines.Ralf Corsepius1-0/+4
2009-12-172009-12-17 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill1-2/+2
* libcsupport/src/termios.c, libfs/src/dosfs/msdos_format.c, libfs/src/nfsclient/src/nfs.c, libfs/src/pipe/fifo.c, libnetworking/lib/rtems_bsdnet_ntp.c, libnetworking/lib/tftpDriver.c, libnetworking/rtems/rtems_glue.c, libnetworking/rtems/rtems_select.c: Eliminate uses of deprecated rtems_clock_get() and replace with properly typed routine.
2009-11-30Whitespace removal.Ralf Corsepius1-27/+27
2009-09-292009-09-29 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius1-2/+0
* libnetworking/lib/tftpDriver.c: Remove vim: meta-tags.
2009-09-292009-09-29 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius1-0/+1
* libnetworking/lib/tftpDriver.c (rtems_tftp_eval_path): Add missing parameter pathlen.
2009-04-292009-04-29 Chris Johns <chrisj@rtems.org>Chris Johns1-1/+1
* libcsupport/include/rtems/libio.h: Add rtems_off64_t for internal use. Update the internal off_t to the 64bit offset. * libnetworking/lib/ftpfs.c, libnetworking/lib/tftpDriver.c, libfs/src/nfsclient/src/nfs.c, libfs/src/imfs/imfs_fifo.c, libfs/src/imfs/memfile.c, libfs/src/imfs/imfs_directory.c, libfs/src/imfs/imfs.h, libfs/src/imfs/deviceio.c: Change off_t to rtems_off64_t. * libmisc/shell/main_msdosfmt.c: Add an info level so the format code can tell the user what is happening. Add more options to control the format configuration. * libfs/src/dosfs/msdos_format.c: Add a print function to display the format progress and print statements. Select a better default cluster size depending on the size of the disk. This lowers the size of the FAT on large disks. Read and maintain the MRB partition information. * libfs/src/dosfs/dosfs.h, libfs/src/dosfs/fat.h, libfs/src/dosfs/fat_file.c, libfs/src/dosfs/fat_file.h, libfs/src/dosfs/msdos.h, libfs/src/dosfs/msdos_conv.c, libfs/src/dosfs/msdos_create.c, libfs/src/dosfs/msdos_file.c, libfs/src/dosfs/msdos_handlers_dir.c, libfs/src/dosfs/msdos_handlers_file.c, libfs/src/dosfs/msdos_init.c, libfs/src/dosfs/msdos_initsupp.c, libfs/src/dosfs/msdos_misc.c, libfs/src/dosfs/msdos_mknod.c: Add long file name support. Change off_t to rtems_off64_t.
2009-01-03Add __attribute__((unused)) to unused function args.Ralf Corsepius1-5/+5
2009-01-03Use INADDR_ANY/INADDR_BROADCAST.Ralf Corsepius1-1/+1
2008-08-03Add prototypes.Ralf Corsepius1-1/+1
2006-12-08Use size_t instead of uint32_t for read/write count-args.Ralf Corsepius1-2/+2
2006-09-01*** empty log message ***Joel Sherrill1-6/+6
2005-05-09socklen_t.Ralf Corsepius1-2/+2
2004-03-292004-03-29 Ralf Corsepius <ralf_corsepius@rtems.org>Ralf Corsepius1-21/+21
* 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.
2004-03-052004-03-05 Joel Sherrill <joel@OARcorp.com>Joel Sherrill1-5/+0
* libblock/src/bdbuf.c, libblock/src/ramdisk.c, libcsupport/src/newlibc.c, libcsupport/src/sync.c, libmisc/cpuuse/cpuuse.c, libmisc/monitor/mon-symbols.c, libmisc/shell/cmds.c, libmisc/shell/shell.c, libnetworking/kern/kern_sysctl.c, libnetworking/lib/ftpfs.c, libnetworking/lib/tftpDriver.c, libnetworking/libc/gethostbydns.c, libnetworking/libc/gethostbyht.c, libnetworking/libc/gethostnamadr.c, libnetworking/libc/getnetbyht.c, libnetworking/libc/getnetnamadr.c, libnetworking/libc/inet_addr.c, libnetworking/libc/linkaddr.c, libnetworking/libc/map_v4v6.c, libnetworking/libc/ns_print.c, libnetworking/libc/ns_ttl.c, libnetworking/libc/nsap_addr.c, libnetworking/libc/rcmd.c, libnetworking/libc/res_debug.c, libnetworking/libc/res_mkupdate.c, libnetworking/libc/res_query.c, libnetworking/libc/res_send.c, libnetworking/libc/res_update.c, libnetworking/net/radix.c, libnetworking/rtems/mkrootfs.c, librpc/src/rpc/clnt_perror.c, librpc/src/rpc/svc.c, score/macros/rtems/score/chain.inl, score/src/objectidtoname.c: Too much was accidentally committed -- revert.
2004-03-052004-03-05 Joel Sherrill <joel@OARcorp.com>Joel Sherrill1-0/+5
* libblock/src/bdbuf.c, libblock/src/ramdisk.c, libcsupport/src/newlibc.c, libcsupport/src/sync.c, libmisc/cpuuse/cpuuse.c, libmisc/monitor/mon-symbols.c, libmisc/shell/cmds.c, libmisc/shell/shell.c, libnetworking/kern/kern_sysctl.c, libnetworking/lib/ftpfs.c, libnetworking/lib/tftpDriver.c, libnetworking/libc/gethostbydns.c, libnetworking/libc/gethostbyht.c, libnetworking/libc/gethostnamadr.c, libnetworking/libc/getnetbyht.c, libnetworking/libc/getnetnamadr.c, libnetworking/libc/inet_addr.c, libnetworking/libc/linkaddr.c, libnetworking/libc/map_v4v6.c, libnetworking/libc/ns_print.c, libnetworking/libc/ns_ttl.c, libnetworking/libc/nsap_addr.c, libnetworking/libc/rcmd.c, libnetworking/libc/res_debug.c, libnetworking/libc/res_mkupdate.c, libnetworking/libc/res_query.c, libnetworking/libc/res_send.c, libnetworking/libc/res_update.c, libnetworking/net/radix.c, libnetworking/rtems/mkrootfs.c, librpc/src/rpc/clnt_perror.c, librpc/src/rpc/rtems_rpc.c, librpc/src/rpc/svc.c, sapi/include/confdefs.h, score/macros/rtems/score/chain.inl, score/src/objectidtoname.c:
2002-10-282002-10-28 Joel Sherrill <joel@OARcorp.com>Joel Sherrill1-2/+2
* Pass to eliminate warnings. * kern/uipc_mbuf.c: Conditional SYSINIT() usage on __rtems__. Fix return statement without a value. * lib/ftpfs.c: read and write filesystem routines return ssize_t. * lib/syslog.c: Add include of <string.h> to eliminate warning. * lib/tftpDriver.c: read and write filesystem routines return ssize_t. * libc/gethostbydns.c: Prototype abort(). * libc/inet_ntoa.c: Prototype strcpy(). * libc/rcmd.c: Add include of <sys/select.h> * net/if_loop.c: Turn token at end of endif to comment. * net/rtsock.c, nfs/bootp_subr.c: Conditional SYSINIT() usage on __rtems__. * rtems/rtems_bootp.c: Add include of <rtems/rtems_bsdnet_internal.h>. * rtems/rtems_bsdnet_internal.h: Added prototypes for memcpy() and memset() since the BSD code tries to avoid using libc .h files since it is used to being in the kernel. * rtems/rtems_syscall.c: read and write filesystem routines return ssize_t.
2002-01-162001-01-16 Eric Norum <eric.norum@usask.ca>Joel Sherrill1-4/+3
* lib/tftpDriver.clib/tftpDriver.c: Fix TFTP block number checking.
2002-01-042002-02-04 Ralf Corsepius <corsepiu@faw.uni-ulm.de>Joel Sherrill1-16/+12
* lib/tftpDriver.c: Remove set_errno_and_return_minus_one, include <rtems/seterr.h>.
2001-12-192001-12-18 Eric Norum <eric.norum@usask.ca>Joel Sherrill1-1/+1
* lib/tftpDriver.c: Allow chdir() to work on TFTP `directories' (path names with a / at the end) while disallowing open() operations on TFTP `directories'.
2001-12-072001-12-07 Eric Norum <eric.norum@usask.ca>Joel Sherrill1-6/+13
* lib/tftpDriver.c: Restore write capability.
2001-10-182001-10-18 Eric Norum <eric.norum@usask.ca>Joel Sherrill1-23/+80
* lib/tftpDriver.c: Properly handles ../ components in chdir() and open() operations within the TFTP file system.
2001-09-272001-09-27 Eric Norum <eric.norum@usask.ca>Joel Sherrill1-24/+107
* lib/tftpDriver.c: Add limited chdir() support to the TFTP filesystem.
2001-09-192001-09-19 Eric Norum <eric.norum@usask.ca>Joel Sherrill1-0/+35
* lib/tftpDriver.c: Add some debugging capability.
2001-01-252001-01-25 Eric Norum <eric.norum@usask.ca>Joel Sherrill1-9/+17
* lib/tftpDriver.c: Reduce first timeout interval. This improves throughput on systems which are dropping packets. Only the first timeout is reduced. This keeps the number of extra packets down on networks that are very busy and dropping lots of packets.
2000-12-142000-12-14 Eric Norum <eric.norum@usask.ca>Joel Sherrill1-498/+585
* lib/tftpDriver.c: Added write capability.