Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[openwrt] implement swlib specific helper functions #94

Open
gear6468 opened this issue Jun 10, 2013 · 0 comments
Open

[openwrt] implement swlib specific helper functions #94

gear6468 opened this issue Jun 10, 2013 · 0 comments

Comments

@gear6468
Copy link
Contributor

/* activate changes in HW switch */
extern int switch_apply(struct swconfig_context *ctx);

/* reset hw switch */
extern int switch_reset(struct swconfig_context *ctx);

/* enable switch VLAN mode /
extern int switch_enable_vlans(struct swconfig_context *ctx);
/
disable switch VLAN mode */
extern int switch_disable_vlans(struct swconfig_context *ctx);

/*** VLAN Switch Functions ***/

/* get/set VLAN-> port assignments _/
extern int get_vlan_ports(int vlan, struct swconfig_context *ctx, int *count, struct switch_port *_ports );
extern int set_vlan_ports(int vlan, struct swconfig_context _ctx, int count, struct switch_port *_ports);

/*** Switch Port Functions ***/

/* enable/diable switch port */
extern int port_enable(int id, struct swconfig_context *ctx);
extern int port_disable(int id, struct swconfig_context *ctx);

/* set/get switch port untagged */
extern int port_set_untag(int id, struct swconfig_context *ctx, int untag);
extern int port_get_untag(int id, struct swconfig_context *ctx, int *untag);

/* set/get switch port primary vlan id */
extern int port_set_pvid(int id, sw_ctx *ctx, int vlan);
extern int port_get_pvid(int id, sw_ctx *ctx, int *vlan);

/* set/get switch port doubletagging */
extern int port_set_doubletag(int id, struct swconfig_context *ctx);
extern int port_get_doubletag(int id, struct swconfig_context *ctx);

/* set/get switch port HW group: 1 = lan, 0 = wan */
extern int port_set_hwgroup(int id, struct swconfig_context *ctx, int lan);
extern int port_get_hwgroup(int id, struct swconfig_context *ctx, int lan);

/* get switch port link information */
extern int port_get_link(int id, struct swconfig_context *ctx, char *info);

/* get switch port receive good packet count /
extern int port_get_recv_good(int id, struct swconfig_context *ctx, int *count);
/
get switch port receive bad packet count */
extern int port_get_recv_bad(int id, struct swconfig_context *ctx, int *count);

@ghost ghost assigned gear6468 Jun 10, 2013
gear6468 added a commit that referenced this issue Jun 10, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant