1 /*
2 * Copyright (c) 2012-2015 Texas Instruments Incorporated - http://www.ti.com
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 *
12 * * Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 *
16 * * Neither the name of Texas Instruments Incorporated nor the names of
17 * its contributors may be used to endorse or promote products derived
18 * from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32 /*
33 * ======== NameServer_client.c ========
34 */
35 #include <ti/ipc/Std.h>
37 #include <stdio.h>
38 #include <stdlib.h>
39 #include <string.h>
40 #include <errno.h>
41 #include <sys/stat.h>
42 #include <sys/types.h>
43 #include <unistd.h>
44 #include <time.h>
45 #include <pthread.h>
47 #include <ti/ipc/NameServer.h>
49 #include <ladclient.h>
50 #include <_lad.h>
52 /* traces in this file are controlled via _NameServer_verbose */
53 Bool _NameServer_verbose = FALSE;
54 #define verbose _NameServer_verbose
56 /*
57 * The NameServer_*() APIs are reproduced here. These versions are just
58 * front-ends for communicating with the actual NameServer module (currently
59 * implemented as a daemon process ala LAD).
60 */
62 Int NameServer_setup(Void)
63 {
64 Int status;
65 LAD_ClientHandle handle;
66 struct LAD_CommandObj cmd;
67 union LAD_ResponseObj rsp;
69 handle = LAD_findHandle();
70 if (handle == LAD_MAXNUMCLIENTS) {
71 PRINTVERBOSE1(
72 "NameServer_setup: can't find connection to daemon for pid %d\n",
73 getpid())
75 return NameServer_E_RESOURCE;
76 }
78 cmd.cmd = LAD_NAMESERVER_SETUP;
79 cmd.clientId = handle;
81 if ((status = LAD_putCommand(&cmd)) != LAD_SUCCESS) {
82 PRINTVERBOSE1(
83 "NameServer_setup: sending LAD command failed, status=%d\n", status)
84 return NameServer_E_FAIL;
85 }
87 if ((status = LAD_getResponse(handle, &rsp)) != LAD_SUCCESS) {
88 PRINTVERBOSE1("NameServer_setup: no LAD response, status=%d\n", status)
89 return(status);
90 }
91 status = rsp.status;
93 PRINTVERBOSE2(
94 "NameServer_setup: got LAD response for client %d, status=%d\n",
95 handle, status)
97 return status;
98 }
100 Int NameServer_destroy(Void)
101 {
102 Int status;
103 LAD_ClientHandle handle;
104 struct LAD_CommandObj cmd;
105 union LAD_ResponseObj rsp;
107 PRINTVERBOSE0("NameServer_destroy: entered\n")
109 handle = LAD_findHandle();
110 if (handle == LAD_MAXNUMCLIENTS) {
111 PRINTVERBOSE1(
112 "NameServer_destroy: can't find connection to daemon for pid %d\n",
113 getpid())
115 return NameServer_E_RESOURCE;
116 }
118 cmd.cmd = LAD_NAMESERVER_DESTROY;
119 cmd.clientId = handle;
121 if ((status = LAD_putCommand(&cmd)) != LAD_SUCCESS) {
122 PRINTVERBOSE1(
123 "NameServer_destroy: sending LAD command failed, status=%d\n", status)
124 return NameServer_E_FAIL;
125 }
127 if ((status = LAD_getResponse(handle, &rsp)) != LAD_SUCCESS) {
128 PRINTVERBOSE1(
129 "NameServer_destroy: no LAD response, status=%d\n", status)
130 return(status);
131 }
132 status = rsp.status;
134 PRINTVERBOSE2(
135 "NameServer_destroy: got LAD response for client %d, status=%d\n",
136 handle, status)
138 return status;
139 }
141 Void NameServer_Params_init(NameServer_Params *params)
142 {
143 Int status;
144 LAD_ClientHandle handle;
145 struct LAD_CommandObj cmd;
146 union LAD_ResponseObj rsp;
148 handle = LAD_findHandle();
149 if (handle == LAD_MAXNUMCLIENTS) {
150 PRINTVERBOSE1(
151 "NameServer_Params_init: can't find connection to daemon for pid %d\n",
152 getpid())
154 return;
155 }
157 cmd.cmd = LAD_NAMESERVER_PARAMS_INIT;
158 cmd.clientId = handle;
160 if ((status = LAD_putCommand(&cmd)) != LAD_SUCCESS) {
161 PRINTVERBOSE1(
162 "NameServer_Params_init: sending LAD command failed, status=%d\n",
163 status)
164 return;
165 }
167 if ((status = LAD_getResponse(handle, &rsp)) != LAD_SUCCESS) {
168 PRINTVERBOSE1(
169 "NameServer_Params_init: no LAD response, status=%d\n", status)
170 return;
171 }
173 PRINTVERBOSE1("NameServer_Params_init: got LAD response for client %d\n",
174 handle)
176 memcpy(params, &rsp.params, sizeof(NameServer_Params));
178 return;
179 }
181 NameServer_Handle NameServer_create(String name,
182 const NameServer_Params *params)
183 {
184 Int status;
185 LAD_ClientHandle handle;
186 struct LAD_CommandObj cmd;
187 union LAD_ResponseObj rsp;
189 handle = LAD_findHandle();
190 if (handle == LAD_MAXNUMCLIENTS) {
191 PRINTVERBOSE1(
192 "NameServer_create: can't find connection to daemon for pid %d\n",
193 getpid())
195 return NULL;
196 }
198 cmd.cmd = LAD_NAMESERVER_CREATE;
199 cmd.clientId = handle;
200 strncpy(cmd.args.create.name, name, NameServer_Params_MAXNAMELEN);
201 memcpy(&cmd.args.create.params, params, sizeof(NameServer_Params));
203 if ((status = LAD_putCommand(&cmd)) != LAD_SUCCESS) {
204 PRINTVERBOSE1(
205 "NameServer_create: sending LAD command failed, status=%d\n",
206 status)
207 return NULL;
208 }
210 if ((status = LAD_getResponse(handle, &rsp)) != LAD_SUCCESS) {
211 PRINTVERBOSE1("NameServer_create: no LAD response, status=%d\n", status)
212 return NULL;
213 }
215 PRINTVERBOSE1("NameServer_create: got LAD response for client %d\n", handle)
217 return rsp.handle;
218 }
220 Ptr NameServer_add(NameServer_Handle nsHandle, String name, Ptr buf,
221 UInt32 len)
222 {
223 Int status;
224 LAD_ClientHandle clHandle;
225 struct LAD_CommandObj cmd;
226 union LAD_ResponseObj rsp;
228 clHandle = LAD_findHandle();
229 if (clHandle == LAD_MAXNUMCLIENTS) {
230 PRINTVERBOSE1(
231 "NameServer_add: can't find connection to daemon for pid %d\n",
232 getpid())
234 return NULL;
235 }
237 cmd.cmd = LAD_NAMESERVER_ADD;
238 cmd.clientId = clHandle;
239 cmd.args.add.handle = nsHandle;
240 strncpy(cmd.args.add.name, name, LAD_MAXENTRYNAMELEN);
241 cmd.args.add.len = len;
243 if (buf != NULL) {
244 memcpy(cmd.args.add.buf, buf, len);
245 }
247 if ((status = LAD_putCommand(&cmd)) != LAD_SUCCESS) {
248 PRINTVERBOSE1(
249 "NameServer_add: sending LAD command failed, status=%d\n",
250 status)
251 return NULL;
252 }
254 if ((status = LAD_getResponse(clHandle, &rsp)) != LAD_SUCCESS) {
255 PRINTVERBOSE1(
256 "NameServer_add: no LAD response, status=%d\n", status)
257 return NULL;
258 }
260 PRINTVERBOSE1(
261 "NameServer_add: got LAD response for client %d\n", clHandle)
263 return rsp.entryPtr;
264 }
266 Int NameServer_get(NameServer_Handle nsHandle, String name, Ptr buf,
267 UInt32 * len, UInt16 procId[])
268 {
269 Int status;
270 LAD_ClientHandle clHandle;
271 struct LAD_CommandObj cmd;
272 union LAD_ResponseObj rsp;
274 clHandle = LAD_findHandle();
275 if (clHandle == LAD_MAXNUMCLIENTS) {
276 PRINTVERBOSE1(
277 "NameServer_get: can't find connection to daemon for pid %d\n",
278 getpid())
280 return NameServer_E_RESOURCE;
281 }
283 cmd.cmd = LAD_NAMESERVER_GET;
284 cmd.clientId = clHandle;
285 cmd.args.get.handle = nsHandle;
286 strncpy(cmd.args.get.name, name, LAD_MAXENTRYNAMELEN);
287 if (procId != NULL) {
288 memcpy(cmd.args.get.procId, procId,
289 sizeof(UInt16) * MultiProc_MAXPROCESSORS);
290 }
291 else {
292 cmd.args.get.procId[0] = (UInt16)-1;
293 }
295 cmd.args.get.len = *len;
297 if ((status = LAD_putCommand(&cmd)) != LAD_SUCCESS) {
298 PRINTVERBOSE1(
299 "NameServer_get: sending LAD command failed, status=%d\n",
300 status)
301 return NameServer_E_FAIL;
302 }
304 if ((status = LAD_getResponse(clHandle, &rsp)) != LAD_SUCCESS) {
305 PRINTVERBOSE1("NameServer_get: no LAD response, status=%d\n",
306 status)
307 return NameServer_E_FAIL;
308 }
310 *len = rsp.get.len;
311 if (rsp.get.buf != NULL) {
312 memcpy(buf, rsp.get.buf, *len);
313 }
315 status = rsp.status;
317 PRINTVERBOSE1("NameServer_get: got LAD response for client %d\n",
318 clHandle)
320 return status;
321 }
323 Ptr NameServer_addUInt32(NameServer_Handle nsHandle, String name, UInt32 value)
324 {
325 Int status;
326 LAD_ClientHandle clHandle;
327 struct LAD_CommandObj cmd;
328 union LAD_ResponseObj rsp;
330 clHandle = LAD_findHandle();
331 if (clHandle == LAD_MAXNUMCLIENTS) {
332 PRINTVERBOSE1(
333 "NameServer_addUInt32: can't find connection to daemon for pid %d\n",
334 getpid())
336 return NULL;
337 }
339 cmd.cmd = LAD_NAMESERVER_ADDUINT32;
340 cmd.clientId = clHandle;
341 cmd.args.addUInt32.handle = nsHandle;
342 strncpy(cmd.args.addUInt32.name, name, LAD_MAXENTRYNAMELEN);
343 cmd.args.addUInt32.val = value;
345 if ((status = LAD_putCommand(&cmd)) != LAD_SUCCESS) {
346 PRINTVERBOSE1(
347 "NameServer_addUInt32: sending LAD command failed, status=%d\n",
348 status)
349 return NULL;
350 }
352 if ((status = LAD_getResponse(clHandle, &rsp)) != LAD_SUCCESS) {
353 PRINTVERBOSE1(
354 "NameServer_addUInt32: no LAD response, status=%d\n", status)
355 return NULL;
356 }
358 PRINTVERBOSE1(
359 "NameServer_addUInt32: got LAD response for client %d\n", clHandle)
361 return rsp.entryPtr;
362 }
364 Int NameServer_getUInt32(NameServer_Handle nsHandle, String name, Ptr buf,
365 UInt16 procId[])
366 {
367 Int status;
368 LAD_ClientHandle clHandle;
369 UInt32 *val;
370 struct LAD_CommandObj cmd;
371 union LAD_ResponseObj rsp;
373 clHandle = LAD_findHandle();
374 if (clHandle == LAD_MAXNUMCLIENTS) {
375 PRINTVERBOSE1(
376 "NameServer_getUInt32: can't find connection to daemon for pid %d\n",
377 getpid())
379 return NameServer_E_RESOURCE;
380 }
382 cmd.cmd = LAD_NAMESERVER_GETUINT32;
383 cmd.clientId = clHandle;
384 cmd.args.getUInt32.handle = nsHandle;
385 strncpy(cmd.args.getUInt32.name, name, LAD_MAXENTRYNAMELEN);
386 if (procId != NULL) {
387 memcpy(cmd.args.getUInt32.procId, procId,
388 sizeof(UInt16) * MultiProc_MAXPROCESSORS);
389 }
390 else {
391 cmd.args.getUInt32.procId[0] = (UInt16)-1;
392 }
394 if ((status = LAD_putCommand(&cmd)) != LAD_SUCCESS) {
395 PRINTVERBOSE1(
396 "NameServer_getUInt32: sending LAD command failed, status=%d\n",
397 status)
398 return NameServer_E_FAIL;
399 }
401 if ((status = LAD_getResponse(clHandle, &rsp)) != LAD_SUCCESS) {
402 PRINTVERBOSE1("NameServer_getUInt32: no LAD response, status=%d\n",
403 status)
404 return NameServer_E_FAIL;
405 }
407 val = (UInt32 *)buf;
408 *val = rsp.getUInt32.val;
409 status = rsp.status;
411 PRINTVERBOSE1("NameServer_getUInt32: got LAD response for client %d\n",
412 clHandle)
414 return status;
415 }
417 /*
418 * ======== NameServer_getLocal ========
419 */
420 Int NameServer_getLocal(NameServer_Handle ns, String name, Ptr buf, UInt32 *len)
421 {
422 Int status;
423 LAD_ClientHandle clHandle;
424 struct LAD_CommandObj cmd;
425 union LAD_ResponseObj rsp;
427 clHandle = LAD_findHandle();
429 if (clHandle == LAD_MAXNUMCLIENTS) {
430 PRINTVERBOSE0("NameServer_getLocal: not connected to LAD\n");
431 return (NameServer_E_RESOURCE);
432 }
434 cmd.cmd = LAD_NAMESERVER_GETLOCAL;
435 cmd.clientId = clHandle;
436 cmd.args.getLocal.handle = ns;
437 strncpy(cmd.args.getLocal.name, name, LAD_MAXENTRYNAMELEN);
438 cmd.args.getLocal.len = *len;
440 if ((status = LAD_putCommand(&cmd)) != LAD_SUCCESS) {
441 PRINTVERBOSE1("NameServer_getLocal: sending LAD command failed, "
442 "status=%d\n", status)
443 return (NameServer_E_FAIL);
444 }
446 if ((status = LAD_getResponse(clHandle, &rsp)) != LAD_SUCCESS) {
447 PRINTVERBOSE1("NameServer_getLocal: no LAD response, status=%d\n",
448 status)
449 return (NameServer_E_FAIL);
450 }
452 *len = rsp.get.len;
453 if (rsp.get.buf != NULL) {
454 memcpy(buf, rsp.get.buf, *len);
455 }
457 status = rsp.get.status;
459 PRINTVERBOSE1("NameServer_getLocal: LAD response, status=%d\n", status)
460 return (status);
461 }
463 /*
464 * ======== NameServer_getLocalUInt32 ========
465 */
466 Int NameServer_getLocalUInt32(NameServer_Handle ns, String name, Ptr buf)
467 {
468 Int status;
469 LAD_ClientHandle clHandle;
470 UInt32 *val;
471 struct LAD_CommandObj cmd;
472 union LAD_ResponseObj rsp;
474 clHandle = LAD_findHandle();
476 if (clHandle == LAD_MAXNUMCLIENTS) {
477 PRINTVERBOSE0("NameServer_getLocalUInt32: not connected to LAD\n");
478 return (NameServer_E_RESOURCE);
479 }
481 cmd.cmd = LAD_NAMESERVER_GETLOCALUINT32;
482 cmd.clientId = clHandle;
483 cmd.args.getLocalUInt32.handle = ns;
484 strncpy(cmd.args.getLocalUInt32.name, name, LAD_MAXENTRYNAMELEN);
486 if ((status = LAD_putCommand(&cmd)) != LAD_SUCCESS) {
487 PRINTVERBOSE1("NameServer_getLocalUInt32: sending LAD command failed, "
488 "status=%d\n", status)
489 return (NameServer_E_FAIL);
490 }
492 if ((status = LAD_getResponse(clHandle, &rsp)) != LAD_SUCCESS) {
493 PRINTVERBOSE1("NameServer_getLocalUInt32: no LAD response, status=%d\n",
494 status)
495 return (NameServer_E_FAIL);
496 }
498 val = (UInt32 *)buf;
499 *val = rsp.getUInt32.val;
500 status = rsp.getUInt32.status;
502 PRINTVERBOSE1("NameServer_getLocalUInt32: LAD response, status=%d\n",
503 status)
504 return (status);
505 }
507 Int NameServer_remove(NameServer_Handle nsHandle, String name)
508 {
509 Int status;
510 LAD_ClientHandle clHandle;
511 struct LAD_CommandObj cmd;
512 union LAD_ResponseObj rsp;
514 clHandle = LAD_findHandle();
515 if (clHandle == LAD_MAXNUMCLIENTS) {
516 PRINTVERBOSE1(
517 "NameServer_remove: can't find connection to daemon for pid %d\n",
518 getpid())
520 return NameServer_E_RESOURCE;
521 }
523 cmd.cmd = LAD_NAMESERVER_REMOVE;
524 cmd.clientId = clHandle;
525 cmd.args.remove.handle = nsHandle;
526 strncpy(cmd.args.remove.name, name, LAD_MAXENTRYNAMELEN);
528 if ((status = LAD_putCommand(&cmd)) != LAD_SUCCESS) {
529 PRINTVERBOSE1(
530 "NameServer_remove: sending LAD command failed, status=%d\n",
531 status)
532 return NameServer_E_FAIL;
533 }
535 if ((status = LAD_getResponse(clHandle, &rsp)) != LAD_SUCCESS) {
536 PRINTVERBOSE1("NameServer_remove: no LAD response, status=%d\n", status)
537 return NameServer_E_FAIL;
538 }
540 status = rsp.status;
542 PRINTVERBOSE1("NameServer_remove: got LAD response for client %d\n",
543 clHandle)
545 return status;
546 }
548 Int NameServer_removeEntry(NameServer_Handle nsHandle, Ptr entry)
549 {
550 Int status;
551 LAD_ClientHandle clHandle;
552 struct LAD_CommandObj cmd;
553 union LAD_ResponseObj rsp;
555 clHandle = LAD_findHandle();
556 if (clHandle == LAD_MAXNUMCLIENTS) {
557 PRINTVERBOSE1(
558 "NameServer_removeEntry: can't find connection to daemon for pid %d\n",
559 getpid())
561 return NameServer_E_RESOURCE;
562 }
564 cmd.cmd = LAD_NAMESERVER_REMOVEENTRY;
565 cmd.clientId = clHandle;
566 cmd.args.removeEntry.handle = nsHandle;
567 cmd.args.removeEntry.entryPtr = entry;
569 if ((status = LAD_putCommand(&cmd)) != LAD_SUCCESS) {
570 PRINTVERBOSE1(
571 "NameServer_removeEntry: sending LAD command failed, status=%d\n",
572 status)
573 return NameServer_E_FAIL;
574 }
576 if ((status = LAD_getResponse(clHandle, &rsp)) != LAD_SUCCESS) {
577 PRINTVERBOSE1("NameServer_removeEntry: no LAD response, status=%d\n",
578 status)
579 return NameServer_E_FAIL;
580 }
582 status = rsp.status;
584 PRINTVERBOSE1("NameServer_removeEntry: got LAD response for client %d\n",
585 clHandle)
587 return status;
588 }
590 Int NameServer_delete(NameServer_Handle *nsHandle)
591 {
592 Int status;
593 LAD_ClientHandle clHandle;
594 struct LAD_CommandObj cmd;
595 union LAD_ResponseObj rsp;
597 clHandle = LAD_findHandle();
598 if (clHandle == LAD_MAXNUMCLIENTS) {
599 PRINTVERBOSE1(
600 "NameServer_delete: can't find connection to daemon for pid %d\n",
601 getpid())
603 return NameServer_E_RESOURCE;
604 }
606 cmd.cmd = LAD_NAMESERVER_DELETE;
607 cmd.clientId = clHandle;
608 cmd.args.delete.handle = *nsHandle;
610 if ((status = LAD_putCommand(&cmd)) != LAD_SUCCESS) {
611 PRINTVERBOSE1(
612 "NameServer_delete: sending LAD command failed, status=%d\n",
613 status)
614 return NameServer_E_FAIL;
615 }
617 if ((status = LAD_getResponse(clHandle, &rsp)) != LAD_SUCCESS) {
618 PRINTVERBOSE1("NameServer_delete: no LAD response, status=%d\n", status)
619 return NameServer_E_FAIL;
620 }
622 *nsHandle = rsp.delete.handle;
623 status = rsp.status;
625 PRINTVERBOSE1("NameServer_delete: got LAD response for client %d\n",
626 clHandle)
628 return status;
629 }
631 /*
632 * ======== NameServer_attach ========
633 * Internal function.
634 */
635 Int NameServer_attach(UInt16 procId)
636 {
637 Int status;
638 LAD_ClientHandle clHandle;
639 struct LAD_CommandObj cmd;
640 union LAD_ResponseObj rsp;
642 clHandle = LAD_findHandle();
644 if (clHandle == LAD_MAXNUMCLIENTS) {
645 PRINTVERBOSE0("NameServer_attach: not connected to LAD\n");
646 return (NameServer_E_RESOURCE);
647 }
649 cmd.cmd = LAD_NAMESERVER_ATTACH;
650 cmd.clientId = clHandle;
651 cmd.args.attach.procId = procId;
653 if ((status = LAD_putCommand(&cmd)) != LAD_SUCCESS) {
654 PRINTVERBOSE1("NameServer_attach: sending LAD command failed, "
655 "status=%d\n", status);
656 return (NameServer_E_FAIL);
657 }
659 if ((status = LAD_getResponse(clHandle, &rsp)) != LAD_SUCCESS) {
660 PRINTVERBOSE1("NameServer_attach: no LAD response, status=%d\n",
661 status);
662 return (NameServer_E_FAIL);
663 }
665 status = rsp.status;
666 PRINTVERBOSE1("NameServer_attach: LAD response, status=%d\n", status)
667 return (status);
668 }
670 /*
671 * ======== NameServer_detach ========
672 * Internal function.
673 */
674 Int NameServer_detach(UInt16 procId)
675 {
676 Int status;
677 LAD_ClientHandle clHandle;
678 struct LAD_CommandObj cmd;
679 union LAD_ResponseObj rsp;
681 clHandle = LAD_findHandle();
683 if (clHandle == LAD_MAXNUMCLIENTS) {
684 PRINTVERBOSE0("NameServer_detach: not connected to LAD\n");
685 return (NameServer_E_RESOURCE);
686 }
688 cmd.cmd = LAD_NAMESERVER_DETACH;
689 cmd.clientId = clHandle;
690 cmd.args.detach.procId = procId;
692 if ((status = LAD_putCommand(&cmd)) != LAD_SUCCESS) {
693 PRINTVERBOSE1("NameServer_detach: sending LAD command failed, "
694 "status=%d\n", status);
695 return (NameServer_E_FAIL);
696 }
698 if ((status = LAD_getResponse(clHandle, &rsp)) != LAD_SUCCESS) {
699 PRINTVERBOSE1("NameServer_detach: no LAD response, status=%d\n",
700 status);
701 return (NameServer_E_FAIL);
702 }
704 status = rsp.status;
705 PRINTVERBOSE1("NameServer_detach: LAD response, status=%d\n", status)
706 return (status);
707 }