vir_bytes user_addr, vir_bytes count,
void *loc_addr) );
_PROTOTYPE( static void do_stop, (message *mp) );
+_PROTOTYPE( static void do_getname, (message *mp) );
_PROTOTYPE( static void lance_dump, (void) );
_PROTOTYPE( static void lance_stop, (void) );
static int tx_slot_nr = 0; /* Tx-slot number */
static int cur_tx_slot_nr = 0; /* Tx-slot number */
static char isstored[TX_RING_SIZE]; /* Tx-slot in-use */
+static char *progname;
/*===========================================================================*
void main( int argc, char **argv )
{
message m;
- int i,irq,r;
+ int i,irq,r, tasknr;
ether_card_t *ec;
long v;
int fkeys, sfkeys;
+ (progname=strrchr(argv[0],'/')) ? progname++ : (progname=argv[0]);
env_setargs( argc, argv );
(void) env_parse("ETH_IGN_PROTO", "x", 0, &v, 0x0000L, 0xFFFFL);
eth_ign_proto= htons((u16_t) v);
+ /* Try to notify inet that we are present (again) */
+ r = findproc("inet", &tasknr);
+ if (r == OK)
+ notify(tasknr);
+
while (TRUE)
{
for (i=0;i<EC_PORT_NR_MAX;++i)
case DL_INIT: do_init(&m); break;
case DL_GETSTAT: do_getstat(&m); break;
case DL_STOP: do_stop(&m); break;
+ case DL_GETNAME: do_getname(&m); break;
case FKEY_PRESSED: lance_dump(); break;
/*case HARD_STOP: lance_stop(); break;*/
case SYS_SIG:
return lance_version;
}
+/*===========================================================================*
+ * do_getname *
+ *===========================================================================*/
+static void do_getname(mp)
+message *mp;
+{
+ int r;
+
+ strncpy(mp->DL_NAME, progname, sizeof(mp->DL_NAME));
+ mp->DL_NAME[sizeof(mp->DL_NAME)-1]= '\0';
+ mp->m_type= DL_NAME_REPLY;
+ r= send(mp->m_source, mp);
+ if (r != OK)
+ panic("LANCE", "do_getname: send failed", r);
+}
/*===========================================================================*
* lance_init_card *