|
1 .\" |
|
2 .\" Copyright 2004-2006 Intel Corporation |
|
3 .\" |
|
4 .\" Licensed under the Apache License, Version 2.0 (the "License"); |
|
5 .\" you may not use this file except in compliance with the License. |
|
6 .\" You may obtain a copy of the License at |
|
7 .\" |
|
8 .\" http://www.apache.org/licenses/LICENSE-2.0 |
|
9 .\" |
|
10 .\" Unless required by applicable law or agreed to in writing, software |
|
11 .\" distributed under the License is distributed on an "AS IS" BASIS, |
|
12 .\" WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
|
13 .\" See the License for the specific language governing permissions and |
|
14 .\" limitations under the License. |
|
15 .\" |
|
16 |
|
17 .TH dtnquery 1 "November 16, 2010" |
|
18 .LO 1 |
|
19 .SH NAME |
|
20 dtnquery \- send DTN queries |
|
21 .SH SYNOPSIS |
|
22 .B dtnquery |
|
23 .RB -s |
|
24 .IR src |
|
25 .RB [ -d |
|
26 .IR dest ] |
|
27 .RB [ -f |
|
28 .IR filename ] |
|
29 .RB [ -t |
|
30 .IR literal | base64 | file ] |
|
31 .RB [ -q |
|
32 .IR query ] |
|
33 .RB [ -r |
|
34 .IR exact ] |
|
35 .RB [ -m |
|
36 .IR send | receive | both ] |
|
37 .RB [ -E |
|
38 .IR seconds ] |
|
39 .RB [ -e |
|
40 .IR seconds ] |
|
41 .RB [ -hv ] |
|
42 |
|
43 .SH DESCRIPTION |
|
44 .B dtnquery |
|
45 injects bundle queries into a DTN. To do this, it connects |
|
46 to a dtnd daemon using the DTN API. |
|
47 .PP |
|
48 If dtnquery is started in asynchronous mode to send a query |
|
49 .B -m send |
|
50 it will close once all outstanding queries have been sent. |
|
51 .PP |
|
52 It should then be run again in asynchronous receive mode |
|
53 .B -m receive |
|
54 to receive the query response. |
|
55 .PP |
|
56 If this connection is synchronous (default) |
|
57 .B -m both |
|
58 dtnquery will both send the query and wait to receive the |
|
59 response. |
|
60 .PP |
|
61 On receiving a response, it will be stored in the directory |
|
62 specified by the |
|
63 .B -r <response_path>. |
|
64 |
|
65 .SH RETURN VALUES |
|
66 Returns 1 if there was an error processing the arguments. |
|
67 Otherwise |
|
68 .B dtnquery |
|
69 returns 0. |
|
70 |
|
71 .SH OPTIONS |
|
72 .TP |
|
73 .B \-\^s |
|
74 The source EID for the bundle query. It should be an endpoint for which |
|
75 the dtnd is responsible, but that is not currently enforced. |
|
76 (Required) |
|
77 .TP |
|
78 .B \-\^d |
|
79 The destination EID for the bundle. |
|
80 .TP |
|
81 .B \-\^f |
|
82 The file name to save the response as.d) |
|
83 .TP |
|
84 .B \-\^t |
|
85 Type of query. Can be `literal' (default), `base64' or `file'. |
|
86 .TP |
|
87 .B \-\^q |
|
88 The query value, or if the type of query is file (-t file), the matching |
|
89 file path. Values/paths must be enclosed in quotes e.g. -p "some |
|
90 literal query" or -p "my file.txt". Query files must be comma |
|
91 separated containing see |
|
92 .B dtnmatch. |
|
93 .TP |
|
94 .B \-\^r |
|
95 The matching rule. Currently only `exact' is supported. |
|
96 .TP |
|
97 .B \-\^m |
|
98 Mode to run in. Can be asynchronous: `send' or `receive' or synchronous |
|
99 `both' (default). |
|
100 .TP |
|
101 .B \-\^E |
|
102 The number of seconds to wait for a query response. Default 0: listen |
|
103 forever |
|
104 .TP |
|
105 .B \-\^e |
|
106 The number of seconds until the bundle expires from the DTN. Default |
|
107 is 3600 (one hour). |
|
108 .TP |
|
109 .B \-\^h |
|
110 Print a help message and exit. |
|
111 .TP |
|
112 .B \-\^v |
|
113 Be verbose. Adds diagnostic information to the standard output. |
|
114 .TP |
|
115 |
|
116 .SH ENVIRONMENT |
|
117 .TP |
|
118 .B DTNAPI_ADDR |
|
119 If |
|
120 .B DTNAPI_ADDR |
|
121 is set, |
|
122 .B dtnsend |
|
123 uses it as the hostname to connect to for DTN API operations. |
|
124 .TP |
|
125 .B DTNAPI_PORT |
|
126 If |
|
127 .B DTNAPI_PORT |
|
128 is set, its value is used as the TCP port to connect to |
|
129 for DTN API operations. |
|
130 .SH "SEE ALSO" |
|
131 dtnrespond(1), dtnmatch(1), dtnd(8). |