📄 vlan.h
字号:
/*
*
* vlan.h
* original author:wengex 2007.8.28
* 提供vlan.c所使用的函数声明以及全局变量
* Copyright (c) 2001-2007 by Red-Giant Network, Inc.
* All rights reserved.
*/
#ifndef _VLAN_H
#define _VLAN_H
#define DEFAULT_VLAN 1
#define VLAN_NUM 4096
#define PORT_NUM 1024
#define HASH_SIZE_VLAN 64 /* vlan表大小 */
#define HASH_SIZE_PORT 64 /* port表大小 */
#define HASH_MASK_VLAN (HASH_SIZE_VLAN-1)
#define HASH_MASK_PORT (HASH_SIZE_PORT-1)
typedef struct vlan_s vlan_t ;
typedef struct port_s port_t;
struct vlan_t
{
struct vlan_t *next;
int vid;
char *name;
struct port_t *same_vlan_port_table[PORT_NUM];
} ;
struct port_t
{
struct port_t *next ;
int pid;
int speed;
int duplex;
struct vlan_t * same_port_vlan_table[VLAN_NUM] ;
};
void init_vlan(void);;
void print_vlan(int vid );
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -