• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asus-wl-520gu-7.0.1.45/src/router/rp-l2tp/

Lines Matching refs:prototype

28 static l2tp_peer prototype;
47 { "peer", OPT_TYPE_IPADDR, &prototype.addr.sin_addr.s_addr},
48 { "mask", OPT_TYPE_INT, &prototype.mask_bits},
57 { "hide-avps", OPT_TYPE_BOOL, &prototype.hide_avps},
58 { "retain-tunnel", OPT_TYPE_BOOL, &prototype.retain_tunnel},
59 { "persist", OPT_TYPE_BOOL, &prototype.persist},
60 { "holdoff", OPT_TYPE_INT, &prototype.holdoff},
61 { "maxfail", OPT_TYPE_INT, &prototype.maxfail},
62 { "strict-ip-check", OPT_TYPE_BOOL, &prototype.validate_peer_ip},
76 prototype.lac_ops = handler->call_ops;
90 prototype.lns_ops = handler->call_ops;
103 * Copies secret to prototype
110 strncpy(prototype.secret, value, MAX_SECRET_LEN);
111 prototype.secret[MAX_SECRET_LEN-1] = 0;
112 prototype.secret_len = strlen(prototype.secret);
125 * Copies hostname to prototype
132 strncpy(prototype.hostname, value, MAX_HOSTNAME);
133 prototype.hostname[MAX_HOSTNAME-1] = 0;
134 prototype.hostname_len = strlen(prototype.hostname);
147 * Copies peername to prototype
154 strncpy(prototype.peername, value, MAX_HOSTNAME);
155 prototype.peername[MAX_HOSTNAME-1] = 0;
156 prototype.peername_len = strlen(prototype.peername);
169 * Copies LAC options to prototype
180 if (prototype.num_lac_options < MAX_OPTS) {
182 if (x) prototype.lac_options[prototype.num_lac_options++] = x;
183 prototype.lac_options[prototype.num_lac_options] = NULL;
200 * Copies LNS options to prototype
211 if (prototype.num_lns_options < MAX_OPTS) {
213 if (x) prototype.lns_options[prototype.num_lns_options++] = x;
214 prototype.lns_options[prototype.num_lns_options] = NULL;
242 memset(&prototype, 0, sizeof(prototype));
243 prototype.mask_bits = 32;
244 prototype.validate_peer_ip = 1;
252 prototype.addr.sin_port = htons(u16);
253 prototype.addr.sin_family = AF_INET;
256 if (!prototype.secret_len) {
261 if (!prototype.lns_ops && !prototype.lac_ops) {
267 peer = l2tp_peer_insert(&prototype.addr);
270 peer->mask_bits = prototype.mask_bits;
271 memcpy(&peer->hostname,&prototype.hostname, sizeof(prototype.hostname));
272 peer->hostname_len = prototype.hostname_len;
273 memcpy(&peer->peername,&prototype.peername, sizeof(prototype.peername));
274 peer->peername_len = prototype.peername_len;
275 memcpy(&peer->secret, &prototype.secret, MAX_SECRET_LEN);
276 peer->secret_len = prototype.secret_len;
277 peer->lns_ops = prototype.lns_ops;
278 memcpy(&peer->lns_options,&prototype.lns_options,sizeof(prototype.lns_options));
279 peer->lac_ops = prototype.lac_ops;
280 memcpy(&peer->lac_options,&prototype.lac_options,sizeof(prototype.lac_options));
281 peer->hide_avps = prototype.hide_avps;
282 peer->retain_tunnel = prototype.retain_tunnel;
283 peer->persist = prototype.persist;
284 peer->holdoff = prototype.holdoff;
285 peer->maxfail = prototype.maxfail;
287 peer->validate_peer_ip = prototype.validate_peer_ip;