GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: lib/librpcsvc/rex.c Lines: 0 116 0.0 %
Date: 2017-11-13 Branches: 0 96 0.0 %

Line Branch Exec Source
1
/*
2
 * Please do not edit this file.
3
 * It was generated using rpcgen.
4
 */
5
6
#include "rex.h"
7
8
bool_t
9
xdr_rexstring(XDR *xdrs, rexstring *objp)
10
{
11
12
	if (!xdr_string(xdrs, objp, 1024))
13
		return (FALSE);
14
	return (TRUE);
15
}
16
17
bool_t
18
xdr_rex_start(XDR *xdrs, rex_start *objp)
19
{
20
21
	int32_t *buf;
22
23
	if (xdrs->x_op == XDR_ENCODE) {
24
		if (!xdr_array(xdrs, (char **)&objp->rst_cmd.rst_cmd_val,
25
	    (u_int *)&objp->rst_cmd.rst_cmd_len,
26
	    ~0, sizeof(rexstring), (xdrproc_t)xdr_rexstring))
27
			return (FALSE);
28
		if (!xdr_rexstring(xdrs, &objp->rst_host))
29
			return (FALSE);
30
		if (!xdr_rexstring(xdrs, &objp->rst_fsname))
31
			return (FALSE);
32
		if (!xdr_rexstring(xdrs, &objp->rst_dirwithin))
33
			return (FALSE);
34
		if (!xdr_array(xdrs, (char **)&objp->rst_env.rst_env_val,
35
	    (u_int *)&objp->rst_env.rst_env_len,
36
	    ~0, sizeof(rexstring), (xdrproc_t)xdr_rexstring))
37
			return (FALSE);
38
		buf = (int32_t *)XDR_INLINE(xdrs,
39
		    4 * BYTES_PER_XDR_UNIT);
40
		if (buf == NULL) {
41
			if (!xdr_u_int(xdrs, &objp->rst_port0))
42
				return (FALSE);
43
			if (!xdr_u_int(xdrs, &objp->rst_port1))
44
				return (FALSE);
45
			if (!xdr_u_int(xdrs, &objp->rst_port2))
46
				return (FALSE);
47
			if (!xdr_u_int(xdrs, &objp->rst_flags))
48
				return (FALSE);
49
		} else {
50
			IXDR_PUT_U_LONG(buf, objp->rst_port0);
51
			IXDR_PUT_U_LONG(buf, objp->rst_port1);
52
			IXDR_PUT_U_LONG(buf, objp->rst_port2);
53
			IXDR_PUT_U_LONG(buf, objp->rst_flags);
54
		}
55
		return (TRUE);
56
	} else if (xdrs->x_op == XDR_DECODE) {
57
		if (!xdr_array(xdrs, (char **)&objp->rst_cmd.rst_cmd_val,
58
	    (u_int *)&objp->rst_cmd.rst_cmd_len,
59
	    ~0, sizeof(rexstring), (xdrproc_t)xdr_rexstring))
60
			return (FALSE);
61
		if (!xdr_rexstring(xdrs, &objp->rst_host))
62
			return (FALSE);
63
		if (!xdr_rexstring(xdrs, &objp->rst_fsname))
64
			return (FALSE);
65
		if (!xdr_rexstring(xdrs, &objp->rst_dirwithin))
66
			return (FALSE);
67
		if (!xdr_array(xdrs, (char **)&objp->rst_env.rst_env_val,
68
	    (u_int *)&objp->rst_env.rst_env_len,
69
	    ~0, sizeof(rexstring), (xdrproc_t)xdr_rexstring))
70
			return (FALSE);
71
		buf = (int32_t *)XDR_INLINE(xdrs,
72
		    4 * BYTES_PER_XDR_UNIT);
73
		if (buf == NULL) {
74
			if (!xdr_u_int(xdrs, &objp->rst_port0))
75
				return (FALSE);
76
			if (!xdr_u_int(xdrs, &objp->rst_port1))
77
				return (FALSE);
78
			if (!xdr_u_int(xdrs, &objp->rst_port2))
79
				return (FALSE);
80
			if (!xdr_u_int(xdrs, &objp->rst_flags))
81
				return (FALSE);
82
		} else {
83
			objp->rst_port0 = IXDR_GET_U_LONG(buf);
84
			objp->rst_port1 = IXDR_GET_U_LONG(buf);
85
			objp->rst_port2 = IXDR_GET_U_LONG(buf);
86
			objp->rst_flags = IXDR_GET_U_LONG(buf);
87
		}
88
		return (TRUE);
89
	}
90
91
	if (!xdr_array(xdrs, (char **)&objp->rst_cmd.rst_cmd_val,
92
	    (u_int *)&objp->rst_cmd.rst_cmd_len,
93
	    ~0, sizeof(rexstring), (xdrproc_t)xdr_rexstring))
94
		return (FALSE);
95
	if (!xdr_rexstring(xdrs, &objp->rst_host))
96
		return (FALSE);
97
	if (!xdr_rexstring(xdrs, &objp->rst_fsname))
98
		return (FALSE);
99
	if (!xdr_rexstring(xdrs, &objp->rst_dirwithin))
100
		return (FALSE);
101
	if (!xdr_array(xdrs, (char **)&objp->rst_env.rst_env_val,
102
	    (u_int *)&objp->rst_env.rst_env_len,
103
	    ~0, sizeof(rexstring), (xdrproc_t)xdr_rexstring))
104
		return (FALSE);
105
	if (!xdr_u_int(xdrs, &objp->rst_port0))
106
		return (FALSE);
107
	if (!xdr_u_int(xdrs, &objp->rst_port1))
108
		return (FALSE);
109
	if (!xdr_u_int(xdrs, &objp->rst_port2))
110
		return (FALSE);
111
	if (!xdr_u_int(xdrs, &objp->rst_flags))
112
		return (FALSE);
113
	return (TRUE);
114
}
115
116
bool_t
117
xdr_rex_result(XDR *xdrs, rex_result *objp)
118
{
119
120
121
	if (!xdr_int(xdrs, &objp->rlt_stat))
122
		return (FALSE);
123
	if (!xdr_rexstring(xdrs, &objp->rlt_message))
124
		return (FALSE);
125
	return (TRUE);
126
}
127
128
bool_t
129
xdr_sgttyb(XDR *xdrs, sgttyb *objp)
130
{
131
132
133
	if (!xdr_u_int(xdrs, &objp->four))
134
		return (FALSE);
135
	if (!xdr_opaque(xdrs, objp->chars, 4))
136
		return (FALSE);
137
	if (!xdr_u_int(xdrs, &objp->flags))
138
		return (FALSE);
139
	return (TRUE);
140
}
141
142
bool_t
143
xdr_tchars(XDR *xdrs, tchars *objp)
144
{
145
146
147
	if (!xdr_u_int(xdrs, &objp->six))
148
		return (FALSE);
149
	if (!xdr_opaque(xdrs, objp->chars, 6))
150
		return (FALSE);
151
	return (TRUE);
152
}
153
154
bool_t
155
xdr_ltchars(XDR *xdrs, ltchars *objp)
156
{
157
158
159
	if (!xdr_u_int(xdrs, &objp->six))
160
		return (FALSE);
161
	if (!xdr_opaque(xdrs, objp->chars, 6))
162
		return (FALSE);
163
	if (!xdr_u_int(xdrs, &objp->mode))
164
		return (FALSE);
165
	return (TRUE);
166
}
167
168
bool_t
169
xdr_rex_ttysize(XDR *xdrs, rex_ttysize *objp)
170
{
171
172
173
	if (!xdr_int(xdrs, &objp->ts_lines))
174
		return (FALSE);
175
	if (!xdr_int(xdrs, &objp->ts_cols))
176
		return (FALSE);
177
	return (TRUE);
178
}
179
180
bool_t
181
xdr_rex_ttymode(XDR *xdrs, rex_ttymode *objp)
182
{
183
184
185
	if (!xdr_sgttyb(xdrs, &objp->basic))
186
		return (FALSE);
187
	if (!xdr_tchars(xdrs, &objp->more))
188
		return (FALSE);
189
	if (!xdr_ltchars(xdrs, &objp->yetmore))
190
		return (FALSE);
191
	if (!xdr_u_int(xdrs, &objp->andmore))
192
		return (FALSE);
193
	return (TRUE);
194
}