Networking Forums

Networking Forums > Computer Networking > Linux Networking > Added file under /proc, when FDB entries are larger, system crashes

Reply
Thread Tools Display Modes

Added file under /proc, when FDB entries are larger, system crashes

 
 
Santa
Guest
Posts: n/a

 
      04-02-2004, 11:25 PM
I added a file under /proc for Proc file system. When our FDB mac
entries are higher (around 1K entries) it crashes, I couldn't able to
figureout the problem. This is working for 256 entries, if the MAC
entries are more than 1K then crashes. Appreciated for help.

static int proc_read_arlentry(char *page, char **start,
off_t off, int count,
int *eof, void *data)
{
int len =0;
arl_entry_t arl_entry;
u32 first = 1;

do{
if(get_arl_entry (&arl_entry, first) == 0){ //valid MAC
len += sprintf(page+len, "MAC Addr:\t
%02x:%02x:%02x:%02x:%02x:%02x\n",
arl_entry.mac[0],
arl_entry.mac[1],
arl_entry.mac[2],
arl_entry.mac[3],
arl_entry.mac[4],
arl_entry.mac[5]);
len += sprintf(page+len, "ARL Flag:\t 0x%lx\n", arl_entry.flag);

}
first = 0;
}while(!(arl_entry.flag & 0x01)); // end of table


//*eof = 1;

*start = page+off;
len -= off;
if (len < count) {
*eof = 1;
if(len <= 0)
return 0;
} else
len = count;

return len;
}
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Linksys WUSB54Gv2 causing system crashes qp Wireless Internet 0 11-26-2005 06:03 PM
Linksys WUSB54Gv2 causing system crashes qp Wireless Internet 0 11-26-2005 04:23 PM
Added some debugging stuff under net/ipv4, I can see the new function in System.map file, I can't see that under /proc/ksyms once I loaded new kernel, why? santa19992000@yahoo.com Linux Networking 0 08-22-2005 03:45 PM
MN-720 : system crashes after incomplete firmware upgrade Craig Albert Broadband Hardware 1 08-13-2004 02:22 AM
MN-500 larger file transfer error a931048 Broadband Hardware 3 05-14-2004 01:55 AM



1 2 3 4 5 6 7 8 9 10 11