plan 9 kernel history: overview | file list | diff list

1990/0511/port/devdk.c (diff list | history)

1990/0511/sys/src/9/port/devdk.c:66,721990/0617/sys/src/9/port/devdk.c:66,72 (short | long | prev | next)
1990/0312    
#define	  D_OK		1		/* not used */ 
#define	  D_OPEN	2		/* (dkmux to host) connection established */ 
#define	  D_FAIL	3		/* (dkmux to host) connection failed */ 
#define	T_CHG	3		/* linege the status of a connection */ 
1990/0617    
#define	T_CHG	3		/* change the status of a connection */ 
1990/0312    
#define	  D_CLOSE	1		/* close the connection */ 
#define	  D_ISCLOSED	2		/* (dkmux to host) confirm a close */ 
#define	  D_CLOSEALL	3		/* (dkmux to host) close all connections */ 
1990/0511/sys/src/9/port/devdk.c:1003,10091990/0617/sys/src/9/port/devdk.c:1003,1009
1990/0312    
	} 
 
	/* 
	 *  linege state if serving 
1990/0617    
	 *  change state if serving 
1990/0312    
	 */ 
	if(type == D_SERV){ 
		lp->state = Llistening; 
1990/0511/sys/src/9/port/devdk.c:1075,10811990/0617/sys/src/9/port/devdk.c:1075,1083
1990/0312    
		n = streamread(dc, dialstr, sizeof(dialstr)-1); 
		DPRINT("returns %d\n", n); 
		if(n <= 0) 
1990/0617    
{print("bad n\n"); 
1990/0312    
			error(0, Eio); 
1990/0617    
} 
1990/0312    
		dialstr[n] = 0; 
		DPRINT("dialstr = %s\n", dialstr); 
 
1990/0511/sys/src/9/port/devdk.c:1085,10901990/0617/sys/src/9/port/devdk.c:1087,1093
1990/0312    
		n = getfields(dialstr, line, 12, '\n'); 
		if (n < 2) { 
			DPRINT("bad dialstr from dk (1 line)\n"); 
1990/0617    
print("bad dialstr %d '%s'\n", n, dialstr); 
1990/0312    
			error(0, Eio); 
		} 
 
1990/0511/sys/src/9/port/devdk.c:1289,12941990/0617/sys/src/9/port/devdk.c:1292,1303
1990/0312    
	int i; 
 
	dp = (Dk *)a; 
1990/0617    
 
	/* 
	 *  tell datakit we've rebooted. It should close all channels. 
	 */ 
	dkmesg(dp, T_ALIVE, D_RESTART, 0, 0);	/* do this on mips but not 68020 */ 
	dkmesg(dp, T_CHG, D_CLOSEALL, 0, 0); 
1990/0312    
 
	/* 
	 *  loop forever listening 


source code copyright © 1990-2005 Lucent Technologies; see license
Plan 9 distribution
comments to russ cox (rsc@swtch.com)