|
|
Power 6/32 Unix version 1.21
/* $Header: /var/lib/cvsd/repos/cci/cci/usr/src/ucb/talk/print.c,v 1.1.1.1 2019/07/28 12:29:26 root Exp $ */
/* debug print routines */
#include <stdio.h>
#include "ctl.h"
print_request(request)
CTL_MSG *request;
{
printf(" type is %d, l_user %s, r_user %s, r_tty %s,",
request->ctlm_type, request->ctlm_l_name, request->ctlm_r_name,
request->ctlm_r_tty);
printf("id = %d", request->ctlm_id_num);
printf("sender's address ");
print_addr(request->ctlm_ctl_addr);
fflush(stdout);
}
print_response(response)
CTL_RESPONSE *response;
{
printf("type is %d, answer is %d, id = %d\n\n", response->ctlr_type,
response->ctlr_answer, response->ctlr_id_num);
fflush(stdout);
}
/* print_addr is a debug print routine. moved from ctl.c */
print_addr(addr)
struct sockaddr_in addr;
{
int i;
printf("addr = %x, port = %d, family = %o ",
addr.sin_addr, addr.sin_port, addr.sin_family);
/* for (i = 0; i<8;i++) {
/* printf("%o ", (int)addr.sin_zero[i]);
/* }
/**/
putchar('\n');
}
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.