|
|
1.1 root 1: /* $Header: print.c,v 1.2 85/01/09 13:05:02 rcs Exp $ */
2:
3: /* debug print routines */
4:
5: #include <stdio.h>
6: #include "ctl.h"
7:
8: print_request(request)
9: CTL_MSG *request;
10: {
11:
12: printf(" type is %d, l_user %s, r_user %s, r_tty %s,",
13: request->ctlm_type, request->ctlm_l_name, request->ctlm_r_name,
14: request->ctlm_r_tty);
15: printf("id = %d", request->ctlm_id_num);
16: printf("sender's address ");
17: print_addr(request->ctlm_ctl_addr);
18: fflush(stdout);
19: }
20:
21: print_response(response)
22: CTL_RESPONSE *response;
23: {
24: printf("type is %d, answer is %d, id = %d\n\n", response->ctlr_type,
25: response->ctlr_answer, response->ctlr_id_num);
26: fflush(stdout);
27: }
28:
29: /* print_addr is a debug print routine. moved from ctl.c */
30:
31: print_addr(addr)
32: struct sockaddr_in addr;
33: {
34: int i;
35:
36: printf("addr = %x, port = %d, family = %o ",
37: addr.sin_addr, addr.sin_port, addr.sin_family);
38:
39: /* for (i = 0; i<8;i++) {
40: /* printf("%o ", (int)addr.sin_zero[i]);
41: /* }
42: /**/
43: putchar('\n');
44: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.