Subject: netstat -f inet broken
To: None <current-users@sun-lamp.cs.berkeley.edu>
From: David Cornejo <dave@telco-nac.com>
List: current-users
Date: 03/31/1994 09:39:40
netstat -f inet is giving bogus proto names - this is a missed (off_t)
in main.c:

here is a patch that seems to fix it for me:

*** main.c.orig	Thu Jan 13 02:49:01 1994
--- main.c	Thu Mar 31 09:32:04 1994
***************
*** 424,430 ****
  					p->p_name);
  		} else
  			if (tp->pr_cblocks)
! 				(*tp->pr_cblocks)(nl[tp->pr_index].n_value,
  					p->p_name);
  	}
  	endprotoent();
--- 424,430 ----
  					p->p_name);
  		} else
  			if (tp->pr_cblocks)
! 				(*tp->pr_cblocks)((off_t)nl[tp->pr_index].n_value,
  					p->p_name);
  	}
  	endprotoent();
***************
*** 438,444 ****
  					tp->pr_name);
  		} else
  			if (tp->pr_cblocks)
! 				(*tp->pr_cblocks)(nl[tp->pr_index].n_value,
  					tp->pr_name);
  	}
  #endif
--- 438,444 ----
  					tp->pr_name);
  		} else
  			if (tp->pr_cblocks)
! 				(*tp->pr_cblocks)((off_t)nl[tp->pr_index].n_value,
  					tp->pr_name);
  	}
  #endif
***************
*** 452,458 ****
  					tp->pr_name);
  		} else
  			if (tp->pr_cblocks)
! 				(*tp->pr_cblocks)(nl[tp->pr_index].n_value,
  					tp->pr_name);
  	}
  #endif
--- 452,458 ----
  					tp->pr_name);
  		} else
  			if (tp->pr_cblocks)
! 				(*tp->pr_cblocks)((off_t)nl[tp->pr_index].n_value,
  					tp->pr_name);
  	}
  #endif

-- 
Dave Cornejo                         It's just another day in California
Telco Systems NAC                             where "good enough," isn't
Fremont, California, USA
+1 510 490 3111 x5158             also: dave@dogwood.com, dnc@netcom.com

------------------------------------------------------------------------------