Documentation is available at docsis_baseline_privacy.php
- <?php
- /**
- * DOCSIS Baseline Privacy
- *
- * @author David Eder <david@eder.us>
- * @copyright 2004 David Eder
- * @package docsis_config
- * @version .1
- */
- /**
- */
- require_once('docsis_common.php');
- define('DOCSIS_BASELINE_PRIVACY', 17);
- define('DOCSIS_BP_AUTH_TIMEOUT', 1);
- define('DOCSIS_BP_REAUTH_TIMEOUT', 2);
- define('DOCSIS_BP_AUTH_GRACE', 3);
- define('DOCSIS_BP_OP_TIMEOUT', 4);
- define('DOCSIS_BP_REKEY_TIMEOUT', 5);
- define('DOCSIS_BP_TEK_GRACE_TIMEOUT', 6);
- define('DOCSIS_BP_AUTH_REJECT_TIMEOUT', 7);
- define('DOCSIS_BP_SA_MAP_TIMEOUT', 8);
- define('DOCSIS_BP_SA_MAX_RETRIES', 9);
- /**
- * Baseline Privacy
- *
- * @package docsis_config
- */
- class docsis_baseline_privacy extends docsis_encoder_complex
- {
- /**
- * Constructor
- *
- * @param int $code docsis code
- * @param array $value array of predefined fields
- */
- function docsis_baseline_privacy($code=DOCSIS_BASELINE_PRIVACY, $value=array())
- {
- parent::docsis_encoder_complex($code, $value);
- }
- /**
- * Set Authorize Wait Timeout
- *
- * See Baseline Privacy Plus Interface Specification A.1.1.1.1
- *
- * @param int $value seconds from 1 to 30
- */
- function set_auth_timeout($value)
- {
- if($value < 1 || $value > 30) trigger_error('Auth Timeout must be 1 to 30', E_USER_WARNING);
- $this->value[DOCSIS_BP_AUTH_TIMEOUT] = new docsis_encoder_uint(DOCSIS_BP_AUTH_TIMEOUT, $value);
- }
- /**
- * Set Reauthorize Wait Timeout
- *
- * See Baseline Privacy Plus Interface Specification A.1.1.1.2
- *
- * @param int $value seconds from 1 to 30
- */
- function set_reauth_timeout($value)
- {
- if($value < 1 || $value > 30) trigger_error('Re-auth Timeout must be 1 to 30', E_USER_WARNING);
- $this->value[DOCSIS_BP_REAUTH_TIMEOUT] = new docsis_encoder_uint(DOCSIS_BP_REAUTH_TIMEOUT, $value);
- }
- /**
- * Set Authorize Grace Time
- *
- * See Baseline Privacy Plus Interface Specification A.1.1.1.3
- *
- * @param int $value seconds from 1 to 6047999
- */
- function set_auth_grace($value)
- {
- if($value < 1 || $value > 6047999) trigger_error('Auth Grace must be 1 to 6047999', E_USER_WARNING);
- $this->value[DOCSIS_BP_AUTH_GRACE] = new docsis_encoder_uint(DOCSIS_BP_AUTH_GRACE, $value);
- }
- /**
- * Set Operational Wait Timeout
- *
- * See Baseline Privacy Plus Interface Specification A.1.1.1.4
- *
- * @param int $value seconds from 1 to 10
- */
- function set_op_timeout($value)
- {
- if($value < 1 || $value > 10) trigger_error('Operational Timeout must be 1 to 10', E_USER_WARNING);
- $this->value[DOCSIS_BP_OP_TIMEOUT] = new docsis_encoder_uint(DOCSIS_BP_OP_TIMEOUT, $value);
- }
- /**
- * Set Rekey Wait Timeout
- *
- * See Baseline Privacy Plus Interface Specification A.1.1.1.5
- *
- * @param int $value seconds from 1 to 10
- */
- function set_rekey_timeout($value)
- {
- if($value < 1 || $value > 10) trigger_error('Rekey Timeout must be 1 to 10', E_USER_WARNING);
- $this->value[DOCSIS_BP_REKEY_TIMEOUT] = new docsis_encoder_uint(DOCSIS_BP_REKEY_TIMEOUT, $value);
- }
- /**
- * Set TEK Grace Time
- *
- * See Baseline Privacy Plus Interface Specification A.1.1.1.6
- *
- * @param int $value seconds from 1 to 302399
- */
- function set_tek_grace_timeout($value)
- {
- if($value < 1 || $value > 302399) trigger_error('TEK Grace Timeout must be 1 to 302399', E_USER_WARNING);
- $this->value[DOCSIS_BP_TEK_GRACE_TIMEOUT] = new docsis_encoder_uint(DOCSIS_BP_TEK_GRACE_TIMEOUT, $value);
- }
- /**
- * Set Authorize Reject Wait Timeout
- *
- * See Baseline Privacy Plus Interface Specification A.1.1.1.7
- *
- * @param int $value seconds from 1 to 600
- */
- function set_auth_reject_timeout($value)
- {
- if($value < 1 || $value > 600) trigger_error('Auth Reject Timeout must be 1 to 600', E_USER_WARNING);
- $this->value[DOCSIS_BP_AUTH_REJECT_TIMEOUT] = new docsis_encoder_uint(DOCSIS_BP_AUTH_REJECT_TIMEOUT, $value);
- }
- /**
- * Set SA Map Wait Timeout
- *
- * See Baseline Privacy Plus Interface Specification A.1.1.1.8
- *
- * @param int $value seconds from 1 to 10
- */
- function set_sa_map_timeout($value)
- {
- if($value < 1 || $value > 10) trigger_error('SA MAP Timeout must be 1 to 10', E_USER_WARNING);
- $this->value[DOCSIS_BP_SA_MAP_TIMEOUT] = new docsis_encoder_uint(DOCSIS_BP_SA_MAP_TIMEOUT, $value);
- }
- /**
- * Set SA Map Max Retries
- *
- * See Baseline Privacy Plus Interface Specification A.1.1.1.9
- *
- * @param int $value retries from 0 to 10
- */
- function set_sa_max_retries($value)
- {
- if($value < 0 || $value > 10) trigger_error('SA MAX Retries must be 0 to 10', E_USER_WARNING);
- $this->value[DOCSIS_BP_SA_MAX_RETRIES] = new docsis_encoder_uint(DOCSIS_BP_SA_MAX_RETRIES, $value);
- }
- }
- ?>
Documentation generated on Mon, 14 Nov 2005 17:59:30 -0700 by phpDocumentor 1.3.0RC3