Deleted Added
full compact
callbootd.c (173412) callbootd.c (230361)
1/*
2
3This code is not copyright, and is placed in the public domain. Feel free to
4use and modify. Please send modifications and/or suggestions + bug fixes to
5
6 Klas Heggemann <klas@nada.kth.se>
7
8*/
9
10#ifndef lint
11static const char rcsid[] =
1/*
2
3This code is not copyright, and is placed in the public domain. Feel free to
4use and modify. Please send modifications and/or suggestions + bug fixes to
5
6 Klas Heggemann <klas@nada.kth.se>
7
8*/
9
10#ifndef lint
11static const char rcsid[] =
12 "$FreeBSD: head/usr.sbin/bootparamd/callbootd/callbootd.c 173412 2007-11-07 10:53:41Z kevlo $";
12 "$FreeBSD: head/usr.sbin/bootparamd/callbootd/callbootd.c 230361 2012-01-20 01:39:26Z eadler $";
13#endif /* not lint */
14
15#include "bootparam_prot.h"
16#include <rpc/rpc.h>
17#include <sys/types.h>
18#include <sys/socket.h>
19#include <netinet/in.h>
20#include <arpa/inet.h>

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

76 bp_whoami_arg whoami_arg;
77 bp_whoami_res *whoami_res, stat_whoami_res;
78 bp_getfile_arg getfile_arg;
79 bp_getfile_res *getfile_res, stat_getfile_res;
80
81
82 long the_inet_addr;
83 CLIENT *clnt;
13#endif /* not lint */
14
15#include "bootparam_prot.h"
16#include <rpc/rpc.h>
17#include <sys/types.h>
18#include <sys/socket.h>
19#include <netinet/in.h>
20#include <arpa/inet.h>

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

76 bp_whoami_arg whoami_arg;
77 bp_whoami_res *whoami_res, stat_whoami_res;
78 bp_getfile_arg getfile_arg;
79 bp_getfile_res *getfile_res, stat_getfile_res;
80
81
82 long the_inet_addr;
83 CLIENT *clnt;
84 enum clnt_stat clnt_stat;
85
86 stat_whoami_res.client_name = cln;
87 stat_whoami_res.domain_name = dmn;
88
89 stat_getfile_res.server_name = cln;
90 stat_getfile_res.server_path = path;
91
92 if (argc < 3)

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

112 if (! broadcast ) {
113 whoami_res = bootparamproc_whoami_1(&whoami_arg, clnt);
114 printf("Whoami returning:\n");
115 if (printwhoami(whoami_res)) {
116 errx(1, "bad answer returned from server %s", server);
117 } else
118 exit(0);
119 } else {
84
85 stat_whoami_res.client_name = cln;
86 stat_whoami_res.domain_name = dmn;
87
88 stat_getfile_res.server_name = cln;
89 stat_getfile_res.server_path = path;
90
91 if (argc < 3)

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

111 if (! broadcast ) {
112 whoami_res = bootparamproc_whoami_1(&whoami_arg, clnt);
113 printf("Whoami returning:\n");
114 if (printwhoami(whoami_res)) {
115 errx(1, "bad answer returned from server %s", server);
116 } else
117 exit(0);
118 } else {
120 clnt_stat=clnt_broadcast(BOOTPARAMPROG, BOOTPARAMVERS,
119 (void)clnt_broadcast(BOOTPARAMPROG, BOOTPARAMVERS,
121 BOOTPARAMPROC_WHOAMI,
122 (xdrproc_t)xdr_bp_whoami_arg,
123 (char *)&whoami_arg,
124 (xdrproc_t)xdr_bp_whoami_res,
125 (char *)&stat_whoami_res,
126 (resultproc_t)eachres_whoami);
127 exit(0);
128 }

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

135 if (! broadcast ) {
136 getfile_res = bootparamproc_getfile_1(&getfile_arg,clnt);
137 printf("getfile returning:\n");
138 if (printgetfile(getfile_res)) {
139 errx(1, "bad answer returned from server %s", server);
140 } else
141 exit(0);
142 } else {
120 BOOTPARAMPROC_WHOAMI,
121 (xdrproc_t)xdr_bp_whoami_arg,
122 (char *)&whoami_arg,
123 (xdrproc_t)xdr_bp_whoami_res,
124 (char *)&stat_whoami_res,
125 (resultproc_t)eachres_whoami);
126 exit(0);
127 }

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

134 if (! broadcast ) {
135 getfile_res = bootparamproc_getfile_1(&getfile_arg,clnt);
136 printf("getfile returning:\n");
137 if (printgetfile(getfile_res)) {
138 errx(1, "bad answer returned from server %s", server);
139 } else
140 exit(0);
141 } else {
143 clnt_stat=clnt_broadcast(BOOTPARAMPROG, BOOTPARAMVERS,
142 (void)clnt_broadcast(BOOTPARAMPROG, BOOTPARAMVERS,
144 BOOTPARAMPROC_GETFILE,
145 (xdrproc_t)xdr_bp_getfile_arg,
146 (char *)&getfile_arg,
147 (xdrproc_t)xdr_bp_getfile_res,
148 (char *)&stat_getfile_res,
149 (resultproc_t)eachres_getfile);
150 exit(0);
151 }

--- 54 unchanged lines hidden ---
143 BOOTPARAMPROC_GETFILE,
144 (xdrproc_t)xdr_bp_getfile_arg,
145 (char *)&getfile_arg,
146 (xdrproc_t)xdr_bp_getfile_res,
147 (char *)&stat_getfile_res,
148 (resultproc_t)eachres_getfile);
149 exit(0);
150 }

--- 54 unchanged lines hidden ---