250
267
interface *ifp = if_data_obj;
252
syslog(LOG_INFO, "------< NIC >------");
253
syslog(LOG_INFO, " Name = %s", ifp->ifname);
254
syslog(LOG_INFO, " index = %d", ifp->ifindex);
255
syslog(LOG_INFO, " address = %s", inet_ntop2(ifp->address));
269
log_message(LOG_INFO, "------< NIC >------");
270
log_message(LOG_INFO, " Name = %s", ifp->ifname);
271
log_message(LOG_INFO, " index = %d", ifp->ifindex);
272
log_message(LOG_INFO, " address = %s", inet_ntop2(ifp->address));
257
274
/* FIXME: Harcoded for ethernet */
258
275
if (ifp->hw_type == ARPHRD_ETHER)
259
syslog(LOG_INFO, " MAC = %.2x:%.2x:%.2x:%.2x:%.2x:%.2x",
276
log_message(LOG_INFO, " MAC = %.2x:%.2x:%.2x:%.2x:%.2x:%.2x",
260
277
ifp->hw_addr[0], ifp->hw_addr[1], ifp->hw_addr[2]
261
278
, ifp->hw_addr[3], ifp->hw_addr[4], ifp->hw_addr[5]);
263
280
if (ifp->flags & IFF_UP)
264
syslog(LOG_INFO, " is UP");
281
log_message(LOG_INFO, " is UP");
266
283
if (ifp->flags & IFF_RUNNING)
267
syslog(LOG_INFO, " is RUNNING");
284
log_message(LOG_INFO, " is RUNNING");
269
286
if (!(ifp->flags & IFF_UP) && !(ifp->flags & IFF_RUNNING))
270
syslog(LOG_INFO, " is DOWN");
287
log_message(LOG_INFO, " is DOWN");
272
syslog(LOG_INFO, " MTU = %d", ifp->mtu);
289
log_message(LOG_INFO, " MTU = %d", ifp->mtu);
274
291
switch (ifp->hw_type) {
275
292
case ARPHRD_LOOPBACK:
276
syslog(LOG_INFO, " HW Type = LOOPBACK");
293
log_message(LOG_INFO, " HW Type = LOOPBACK");
278
295
case ARPHRD_ETHER:
279
syslog(LOG_INFO, " HW Type = ETHERNET");
296
log_message(LOG_INFO, " HW Type = ETHERNET");
282
syslog(LOG_INFO, " HW Type = UNKNOWN");
299
log_message(LOG_INFO, " HW Type = UNKNOWN");
286
303
/* MII channel supported ? */
287
304
if (IF_MII_SUPPORTED(ifp))
288
syslog(LOG_INFO, " NIC support MII regs");
305
log_message(LOG_INFO, " NIC support MII regs");
289
306
else if (IF_ETHTOOL_SUPPORTED(ifp))
290
syslog(LOG_INFO, " NIC support EHTTOOL GLINK interface");
307
log_message(LOG_INFO, " NIC support EHTTOOL GLINK interface");
292
syslog(LOG_INFO, " Enabling NIC ioctl refresh polling");
309
log_message(LOG_INFO, " Enabling NIC ioctl refresh polling");