#include "stdio.h"
void main()
{
/* 10万个MAC 001D0812171B-001D08139DBA */
FILE *fp;
unsigned int mac_pre=0x001D081;/* MAC 的前7位 */
unsigned int mac_post_start=0x2171B;/* MAC 的后5位,起始MAC 001D0812171B */
unsigned int mac_cnt=;/* 要产生的MAC的个数 */
unsigned int mac_post_index=mac_post_start + 205;/* 本次要产生的起始MAC的后5位,205为已经产生过205个MAC */
unsigned int mac_post_end=mac_post_index+mac_cnt;
fp = fopen("mac_list.txt","w+");
fprintf(fp,"%s","manufacturer=XXXX\n");
fprintf(fp,"%s","customer=XXX\n");
fprintf(fp,"%s","stbtype=XX\n");
fprintf(fp,"%s","stbtypeid=X\n");
for(;mac_post_index {
fprintf(fp,"%07X",mac_pre); /* 输出MAC的前7位 */
fprintf(fp,"%05X\n",mac_post_index); /* 输出MAC的后5位 */
}
fclose(fp);
return;
}
阅读(925) | 评论(0) | 转发(0) |