- struct static_proto_state *state;
- struct static_proto_settings *ps;
- struct device *dev;
- int ret = 0;
- int i;
-
- state = container_of(proto, struct static_proto_state, proto);
- ps = &state->s;
- dev = state->iface->main_dev.dev;
-
- switch (cmd) {
- case PROTO_CMD_SETUP:
- for (i = 0; i < state->s.n_v4; i++) {
- if (ret)
- break;
- ret = system_add_address(dev, AF_INET,
- &ps->v4[i].addr, ps->v4[i].prefix);
- }
- for (i = 0; i < state->s.n_v6; i++) {
- if (ret)
- break;
- ret = system_add_address(dev, AF_INET6,
- &ps->v6[i].addr, ps->v6[i].prefix);
- }