Commit Graph

772 Commits (6f860fd874bfb78ac1a74285fefecc339258bb03)

Author SHA1 Message Date
Ronnie Sahlberg f4442bec27 wondows dont have vasprintf()
disable for now  and reimplement later
2011-08-28 19:45:00 +10:00
Ronnie Sahlberg 6874f61e24 Win32: more win32 adaptations 2011-08-28 19:43:33 +10:00
Ronnie Sahlberg fb6510bb68 VC10 dont like ';;' 2011-08-28 19:30:10 +10:00
Ronnie Sahlberg d8143ff7d7 Win32: the stat structure on win32 does not have blocks or blocksize 2011-08-28 19:29:08 +10:00
Ronnie Sahlberg 93e9306f80 replace index/rindex with modern equivalents 2011-08-28 19:27:57 +10:00
Ronnie Sahlberg a671a46510 replace index/rindex with modern equivalents 2011-08-28 19:27:23 +10:00
Ronnie Sahlberg 9896c7155c nfs_set_auth() is a void and does not return anything 2011-08-28 19:26:07 +10:00
Ronnie Sahlberg be337389bf nfs_set_auth() is a void and does not return anything 2011-08-28 19:25:20 +10:00
Ronnie Sahlberg eecdc4f3cd Win32 changes, include files we need when compiling under win32
and some socket ops are slightly different
2011-08-28 19:24:18 +10:00
Ronnie Sahlberg cd03320955 nfs.x: some rpcgen's can not handle multiple union choices for the same arm.
Make sure each choice has a dedicated arm
2011-08-28 19:05:46 +10:00
Ronnie Sahlberg 11ef53a2e6 callit_cb() : dont return a value from avoid function 2011-08-28 19:00:04 +10:00
Ronnie Sahlberg b3740e09de callit_cb() : dont return a value from avoid function 2011-08-28 18:59:13 +10:00
Ronnie Sahlberg 9115b88cb8 bump the configure.ac version to 1.0 2011-08-01 07:32:08 +10:00
Ronnie Sahlberg 9f89cfcd15 Add packaging directory and script and specfile to build RPM packages 2011-07-31 18:29:28 +10:00
Ronnie Sahlberg b84208a613 Dont install slist.h or libnfs-private.h 2011-07-31 18:29:10 +10:00
Ronnie Sahlberg 963c2f83be Initialize the rootfh handle when creating the nfs context or else
we will try to free a wild pointer if the mount failed
and we proceed to call nfs_destroy_context();
2011-07-31 10:59:46 +10:00
Ronnie Sahlberg b077fdeb65 Add automatic reconnect after TCP session failure for the sync interface.
Once a NFS TCP connection has been idle for a very long time, say
10-15 minutes, it is common that NFS servers will tear down the TCP connection.
So add code to re-connect to the NFS server and re-issue any i/o that might have been in flight (unlikely unless the server has hung)

While it is sufficient to just reconnect to tcp port 2049, it was much simplet to just utilize the nfs_mount() function.
This means that instead of just reconnecting TCP port 2049, we do a full blown
nfs mount via portmapper and mountd protocols.
2011-07-31 10:49:47 +10:00
Ronnie Sahlberg 48593f566f Merge pull request #11 from Memphiz/master
buildsys was missing the installation of the raw haders...
2011-07-20 02:21:02 -07:00
Memphiz 4431432424 [fix] - install the raw headers ... 2011-07-19 20:12:31 +02:00
Ronnie Sahlberg 9f88cb06f5 typo 2011-07-18 11:49:21 +10:00
Ronnie Sahlberg 51b9335b9c FreeBSD works too 2011-07-18 10:45:54 +10:00
Ronnie Sahlberg c03a1e82ac Add cygwin to supported/tested platforms 2011-07-17 16:45:12 +10:00
Ronnie Sahlberg 2b50be4e1c We need the same uint64_t workaround for cygwin as we have for OSX
since rpcgen on cygwin can not handle hyper either
2011-07-17 16:33:27 +10:00
Ronnie Sahlberg fc4bdc2269 Add a flag --enable-tirpc to the configure script 2011-07-17 16:32:45 +10:00
Ronnie Sahlberg 8c27363e21 since UDP is unreliable, send the CALLIT broadcasts 3 times, one second apart when probing for local NFS servers 2011-07-16 17:30:44 +10:00
Ronnie Sahlberg e5964ef905 break out the loop for sending a NFSd probe bcast on every interface into a separate function 2011-07-16 17:27:12 +10:00
Ronnie Sahlberg 4b307c1714 Merge pull request #10 from Memphiz/master
Fixing allocation of if list for osx
2011-07-11 14:32:07 -07:00
Memphiz 41a6209bef [fix] - fix allocation of if list for osx
- removed one unneeded header in examples/nfsclient-bcast.c which was breaking build under osx
2011-07-11 19:16:13 +02:00
Ronnie Sahlberg 9a96dd46d2 We have to include config.h when testing for precense of sockaddr sa_len 2011-07-10 08:50:36 +10:00
Ronnie Sahlberg 1be803ce7f On OSX and other systems where we have sockaddr_in, SIOCGIFCONF returns a packed list of ifreq structures, so we can not just index them as (struct ifreq *)[i]
Instead we have to compute the offset into the buffer for where the next record starts (this offset might or might not be sizeof(struct ifreq)
2011-07-10 08:39:54 +10:00
Ronnie Sahlberg 0b470f1e5e Merge pull request #9 from t-nelson/fix_vpath_build
Fix vpath build
2011-07-07 00:11:58 -07:00
Ronnie Sahlberg 7ac8057eae Merge pull request #8 from t-nelson/update_gitignore
Add new example bins to .gitignore
2011-07-07 00:09:34 -07:00
Trent Nelson 56320c681f Fix out-of-tree (VPATH) builds 2011-07-06 16:38:38 -04:00
Trent Nelson b7e444c6cf Simplify examples Makefile 2011-07-06 16:38:23 -04:00
Trent Nelson 0916784a7c Add new example bins to .gitignore 2011-07-06 16:37:06 -04:00
Ronnie Sahlberg 1ad6f93185 when ioctl() for getting the broadcast address fails, continue the loop to the next entry instead of exiting out 2011-07-04 08:46:19 +10:00
Ronnie Sahlberg ae8569b28f Merge pull request #7 from Memphiz/master
Fix missing include for osx
2011-07-03 06:30:25 -07:00
Memphiz b989ca9c36 - fixed missing include for osx 2011-07-03 15:25:48 +02:00
Ronnie Sahlberg 3847f8f6ae add support got NFSACL protocol and NULL and GETACL procedures.
add example of raw interface for NFSACL
2011-07-03 15:30:18 +10:00
Ronnie Sahlberg f7f931c7e3 add back a check for sa_len in sockaddr structure. 2011-07-03 07:41:15 +10:00
Ronnie Sahlberg 1b9917b886 With broadcast PDUs we can receive multiple replies so must make sure we
delete the previuous unmarshalling buffer when we start over and
process the second pdu to the initial call.

Or else we will leak memory very slowly when processing broadcast RPC replies
2011-07-02 12:16:37 +10:00
Ronnie Sahlberg fb0cf38eda remove some headers we dont need from the listservers example 2011-07-02 11:23:50 +10:00
Ronnie Sahlberg 9ab4d56ef9 Add the bcast and the listservers examples to the new build system 2011-07-02 11:21:44 +10:00
Ronnie Sahlberg 2e4db0d145 Merge remote branch 't-nelson/automake' 2011-07-02 11:10:36 +10:00
Ronnie Sahlberg 67ec00b286 Pull out changes to Makefile.in so that t-nelsons autobuild changes apply 2011-07-02 11:10:05 +10:00
Ronnie Sahlberg 9c4212bf55 document the find_all_servers function 2011-07-02 10:33:19 +10:00
Ronnie Sahlberg 552c766578 add example for sync interface to probe for all local servers 2011-07-02 10:30:16 +10:00
Ronnie Sahlberg 5e9910f0f0 collect nfs servers into a dedicated list and parse this list and print the results once the response collection timeout has expired 2011-07-02 10:04:50 +10:00
Ronnie Sahlberg cb46c8fb9d make the bcast example use timers and wait for up to 1 second for all
replies to come back in
2011-07-02 09:47:20 +10:00
Ronnie Sahlberg 92e787feac update the bcast example to broadcast on all available ipv4 interfaces
to detect nfs servers on the locally attached networks
2011-07-02 09:33:26 +10:00