Memphiz
dba24f1079
[fix] - fixed example - don't exit on read failure during dirent (it could be a directory - non fatal if read fails on that)
...
- fixed sprintf pointer
2011-09-12 18:49:28 +02:00
Memphiz
a8a1b85846
[win32] - make it compile on win32
2011-09-03 15:08:48 +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
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
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
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
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
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
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
Ronnie Sahlberg
28f7bd6696
add example of broadcast context and broadcasting an RPC call
2011-07-02 07:36:46 +10:00
Trent Nelson
6c437065d3
Rewrite build system using automake
...
Initial commit, only linux tested so far.
2011-06-29 14:15:16 -04:00
Ronnie Sahlberg
57187d219a
add test reading from non-0 offset to the sync api example
2011-06-25 15:05:50 +10:00
Ronnie Sahlberg
739df145d6
fix crash in mount/export
...
need to check that status is OK before we start dereferencing the 'export' pointers or else we will segv.
this could happen if trying to pull the list of exports from a host that does not have mountd running, or if we can not connect at all to the host.
2011-06-25 11:06:53 +10:00
Ronnie Sahlberg
1e8994af0f
Add a very subtle bug in nfs_set_error()
...
when nfs_set_error is called with error_string being the result of a lower layer
problem so it is passed as "rpc_get_error()"
This meant that since free that nfs->rpc->error_string before we reference it a few lines further down in the vasprintf(..., error_string,
adn memory corruption triggers.
Valgrind found this, Valgrind rules!
2011-06-21 18:33:50 +10:00
Ronnie Sahlberg
e4a5ba42b8
When doping chunked multi-reads of a blob bigger than the max readsize,
...
a read can sometimes span beyond the end of file.
In which case individual smal read chunks beyond the end of file will return OK, 0 bytes of data and EOF==1
For this case, trap when len==0 and ignore these chunks.
Do not update the read-count if / when len is 0.
2011-06-21 06:07:29 +10:00
Ronnie Sahlberg
cdb19ec164
Redo the buffer handling for input buffers and make sure we only read one PDU at a time
2011-06-20 00:56:47 +10:00
Ronnie Sahlberg
e210bd2af8
remove the need for an explicit rpc context for the highlevel function mount_getexports()
2011-06-19 23:20:35 +10:00
Ronnie Sahlberg
df5af25fd2
add a sync function to get the export list from a server and add an example of how to use this functio n to nfsclient-sync
2011-06-19 22:31:34 +10:00
Ronnie Sahlberg
7f0242ca9a
Add a high-level async function to read the export list
2011-06-19 14:54:17 +10:00
Ronnie Sahlberg
440a7dfced
Add example for how to call MOUNT/EXPORT and get the exports list using the raw lowlevel api.
2011-06-19 10:28:25 +10:00
Ronnie Sahlberg
921f877be4
Add support in read/pread to be aware of the Maximum Read size that the server
...
suggested.
When a read/pread operation that is 'oversize' is issued, the read/pread command will internally chop this up into smaller chunsk and send then concurrently to the server.
As replies come back from the server we add the data to a reassembly buffer
and as soon as all replies have been received we invoke the callback and pass the reassembly buffer back to the application.
2011-06-19 08:43:28 +10:00
Ronnie Sahlberg
e2ba5764d4
Remove the _sync postfix for the synchronous functions
2011-06-18 15:07:53 +10:00
Memphis
a62cb4b707
- include string.h for memcpy
2011-06-01 18:05:50 +02:00
Ronnie Sahlberg
05a777d98a
Initial support for RQUOTA protocol
2011-06-01 20:55:27 +10:00
Ronnie Sahlberg
7d0397cf0f
get rid of some compiler warnings
2011-06-01 00:12:55 +10:00
Ronnie Sahlberg
f4b9cb0e0f
Add example of NFS/FSINFO async call
2011-05-31 23:50:44 +10:00
Ronnie Sahlberg
84004dbf9b
initial libnfs checkin
2011-02-06 15:45:09 +11:00