Deleted Added
full compact
bootparam.c (329145) bootparam.c (332154)
1/* $NetBSD: bootparam.c,v 1.11 1997/06/26 19:11:32 drochner Exp $ */
2
3/*
4 * Copyright (c) 1995 Gordon W. Ross
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 17 unchanged lines hidden (view full) ---

26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33#include <sys/cdefs.h>
1/* $NetBSD: bootparam.c,v 1.11 1997/06/26 19:11:32 drochner Exp $ */
2
3/*
4 * Copyright (c) 1995 Gordon W. Ross
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 17 unchanged lines hidden (view full) ---

26 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
30 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32
33#include <sys/cdefs.h>
34__FBSDID("$FreeBSD: stable/11/stand/libsa/bootparam.c 329132 2018-02-11 19:51:29Z kevans $");
34__FBSDID("$FreeBSD: stable/11/stand/libsa/bootparam.c 332154 2018-04-06 21:37:25Z kevans $");
35
36/*
37 * RPC/bootparams
38 */
39
40#include <sys/param.h>
41#include <sys/socket.h>
42

--- 29 unchanged lines hidden (view full) ---

72#define BOOTPARAM_WHOAMI 1
73#define BOOTPARAM_GETFILE 2
74
75/*
76 * Inet address in RPC messages
77 * (Note, really four ints, NOT chars. Blech.)
78 */
79struct xdr_inaddr {
35
36/*
37 * RPC/bootparams
38 */
39
40#include <sys/param.h>
41#include <sys/socket.h>
42

--- 29 unchanged lines hidden (view full) ---

72#define BOOTPARAM_WHOAMI 1
73#define BOOTPARAM_GETFILE 2
74
75/*
76 * Inet address in RPC messages
77 * (Note, really four ints, NOT chars. Blech.)
78 */
79struct xdr_inaddr {
80 u_int32_t atype;
80 uint32_t atype;
81 int32_t addr[4];
82};
83
84int xdr_inaddr_encode(char **p, struct in_addr ia);
85int xdr_inaddr_decode(char **p, struct in_addr *ia);
86
87int xdr_string_encode(char **p, char *str, int len);
88int xdr_string_decode(char **p, char *str, int *len_p);

--- 14 unchanged lines hidden (view full) ---

103 * to make sure we get responses only from a servers that
104 * know about us (don't want to broadcast a getport call).
105 */
106int
107bp_whoami(int sockfd)
108{
109 /* RPC structures for PMAPPROC_CALLIT */
110 struct args {
81 int32_t addr[4];
82};
83
84int xdr_inaddr_encode(char **p, struct in_addr ia);
85int xdr_inaddr_decode(char **p, struct in_addr *ia);
86
87int xdr_string_encode(char **p, char *str, int len);
88int xdr_string_decode(char **p, char *str, int *len_p);

--- 14 unchanged lines hidden (view full) ---

103 * to make sure we get responses only from a servers that
104 * know about us (don't want to broadcast a getport call).
105 */
106int
107bp_whoami(int sockfd)
108{
109 /* RPC structures for PMAPPROC_CALLIT */
110 struct args {
111 u_int32_t prog;
112 u_int32_t vers;
113 u_int32_t proc;
114 u_int32_t arglen;
111 uint32_t prog;
112 uint32_t vers;
113 uint32_t proc;
114 uint32_t arglen;
115 struct xdr_inaddr xina;
116 } *args;
117 struct repl {
115 struct xdr_inaddr xina;
116 } *args;
117 struct repl {
118 u_int16_t _pad;
119 u_int16_t port;
120 u_int32_t encap_len;
118 uint16_t _pad;
119 uint16_t port;
120 uint32_t encap_len;
121 /* encapsulated data here */
122 n_long capsule[64];
123 } *repl;
124 struct {
125 n_long h[RPC_HEADER_WORDS];
126 struct args d;
127 } sdata;
128 char *send_tail, *recv_head;

--- 307 unchanged lines hidden ---
121 /* encapsulated data here */
122 n_long capsule[64];
123 } *repl;
124 struct {
125 n_long h[RPC_HEADER_WORDS];
126 struct args d;
127 } sdata;
128 char *send_tail, *recv_head;

--- 307 unchanged lines hidden ---