dhcpv6.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. 'use strict';
  2. 'require form';
  3. 'require network';
  4. return network.registerProtocol('dhcpv6', {
  5. getI18n: function() {
  6. return _('DHCPv6 client');
  7. },
  8. getOpkgPackage: function() {
  9. return 'odhcp6c';
  10. },
  11. renderFormOptions: function(s) {
  12. var o;
  13. o = s.taboption('general', form.ListValue, 'reqaddress', _('Request IPv6-address'));
  14. o.value('try', _('try', 'DHCPv6 address request mode'));
  15. o.value('force', _('force', 'DHCPv6 address request mode'));
  16. o.value('none', _('disabled', 'DHCPv6 address request mode'));
  17. o.default = 'try';
  18. o = s.taboption('general', form.Value, 'reqprefix', _('Request IPv6-prefix'),
  19. _('Either a prefix length hint (e.g. 56) only, whereby the operator selects the prefix, or specify a prefix also (e.g. %s)')
  20. .format('<code>2001:db8::/56</code>'));
  21. o.value('auto', _('Automatic'));
  22. o.value('no', _('disabled'));
  23. o.value('48');
  24. o.value('52');
  25. o.value('56');
  26. o.value('60');
  27. o.value('64');
  28. o.default = 'auto';
  29. o = s.taboption('general', form.Flag, 'norelease', _('Do not send a Release when restarting'),
  30. _('Enable to minimise the chance of prefix change after a restart'));
  31. o.default = '1';
  32. o.rmempty = false;
  33. o = s.taboption('advanced', form.Value, 'clientid', _('Client ID to send when requesting DHCP'));
  34. o.datatype = 'hexstring';
  35. }
  36. });