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
Ronnie Sahlberg
28f7bd6696
add example of broadcast context and broadcasting an RPC call
2011-07-02 07:36:46 +10:00
Trent Nelson
c3d740919f
Remove log path with arg from configure.
...
It doesn't seem to be in use anymore?
2011-06-29 14:15:23 -04:00
Trent Nelson
4a75cfa214
Fix example linkage under solaris
2011-06-29 14:15:23 -04:00
Trent Nelson
fc01d2a961
Fix compile error on solaris.
...
Include sys/filio.h explicitly as solaris doesn't define BSD_COMP and
thus doesn't pull this header via sys/ioctl.h. Needed for FIONREAD.
2011-06-29 14:15:23 -04:00
Trent Nelson
13283beb69
Fix solaris bootstrap.
...
Solaris automake doesn't have AM_COND_IF yet. It was introduced
in automake 1.10.2.
2011-06-29 14:15:23 -04:00
Trent Nelson
752d8ed28a
Add back rpcgen uint64 fix for osx
2011-06-29 14:15:22 -04:00
Trent Nelson
2842ff15c8
Handle versioning the libtool way.
2011-06-29 14:15:22 -04: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
7ff2f3a01d
when destroying a udp rpc context, free any udp_dest data we may have
2011-06-26 18:58:54 +10:00
Ronnie Sahlberg
fd59fd0da3
add a function for portmap/callit
...
for the low level raw interface
2011-06-26 18:52:03 +10:00
Ronnie Sahlberg
15083e9a6c
indentation change in portmap.x
2011-06-26 18:48:53 +10:00
Ronnie Sahlberg
5cb18618bc
for portmap callit, change call_args and rell_result to prefix them with pmap_
...
to avoid polluting the namespace too bad
2011-06-26 18:47:33 +10:00
Ronnie Sahlberg
c481da67f2
add function to extract the sockaddr from which we received the current rpc pdu
...
(useful when parsing replies from broadcast rpc calls)
2011-06-26 18:45:38 +10:00
Ronnie Sahlberg
5bf60dc601
add function to set the target for UDP rpc calls.
...
including doing broadcast calls
2011-06-26 18:42:53 +10:00
Ronnie Sahlberg
485bc9b9a7
add function to bind a udp rpc context to a local port/address
2011-06-26 18:40:00 +10:00
Ronnie Sahlberg
870b3764ac
change the portmapper structure 'mapping' to 'pmap_mapping'
...
so we dont pollute the namespace when not needed
2011-06-26 18:35:01 +10:00
Ronnie Sahlberg
070287e516
Dont allow a tcp _connect to a UDP context
2011-06-26 18:32:06 +10:00
Ronnie Sahlberg
0268794fe3
add capability to read UDP datagrams from the socket and pass them to the parser
2011-06-26 18:30:26 +10:00
Ronnie Sahlberg
2d0c44ced1
add a sockaddr_storage so we can store the socket UPD packets came in from
2011-06-26 18:29:49 +10:00
Ronnie Sahlberg
5911f3e8ab
for UDP sockets, we ONLY wait for pollin events
...
since upd sockets are always writeable.
they just silently drop packets when congested
2011-06-26 18:26:34 +10:00
Ronnie Sahlberg
a669857d0d
add support for sending and receiving udp pdu
2011-06-26 18:24:24 +10:00
Ronnie Sahlberg
a9b241622f
add a sockaddr_storage to the rpc context so we can store the socket a upd packet came in from
2011-06-26 18:22:45 +10:00
Ronnie Sahlberg
2ae460667b
add a 'is broadcast' flag to the rpc context structure
...
this is used for broadcast udp rpc calls (==pormatp/callit)
2011-06-26 18:18:59 +10:00
Ronnie Sahlberg
a19924120d
in allocate pdu, if context is udp, dont allocate space for a record marker
2011-06-26 17:30:00 +10:00
Ronnie Sahlberg
9e00b8c663
add function to request a UDP context
...
(private use only since we dont want applications to use UDP)
2011-06-26 17:27:40 +10:00
Ronnie Sahlberg
d16a3ca4bb
add rpc_context field to track if a UDP connection was requested
2011-06-26 17:17:59 +10: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
947e89301b
add RPC definition for the portmapper/callit function
2011-06-25 13:59:12 +10:00
Ronnie Sahlberg
7ed9d87a5b
redo the previous patch to instead initialize max_offset correctly before we invoke the chunks.
...
this is the correct way to fix this bug.
2011-06-25 12:23:52 +10:00
Ronnie Sahlberg
215228a23d
handle the case where we try a multi-read that is completely beyond the end of file.
...
when a multi-read was completely beyond the end of file, this caused us to invoke the callback with a 'read-count' of <0 which the callback would treat as a failure.
This would then cause the callback to treat the data pointer as an error string and try to use it for nfs_set_error().
Since the data pointer was actually a real binary databuffer and not an error string this would cause the NFS error string to look like it contained garbage data.
In this case, where the multi-read fails to read any data at all since it if fully beyond end of file, make sure to invoke the callback with a read-count of 0
2011-06-25 12:13:11 +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