Browse code

TTL parameter added

Jan Janak authored on 14/04/2004 19:08:55
Showing 2 changed files
... ...
@@ -102,6 +102,12 @@ static inline void parse_uri_class(param_hooks_t* _h, param_t* _p)
102 102
 		    (!strncasecmp(_p->name.s + 1, "ransport", 8))) {
103 103
 			_p->type = P_TRANSPORT;
104 104
 			_h->uri.transport = _p;
105
+		} else if (_p->name.len == 2) {
106
+			if (((_p->name.s[1] == 't') || (_p->name.s[1] == 'T')) &&
107
+			    ((_p->name.s[2] == 'l') || (_p->name.s[2] == 'L'))) {
108
+				_p->type = P_TTL;
109
+				_h->uri.ttl = _p;
110
+			}
105 111
 		}
106 112
 		break;
107 113
 
... ...
@@ -458,6 +464,7 @@ static inline void print_param(FILE* _o, param_t* _p)
458 464
 	case P_LR:        type = "P_LR";        break;
459 465
 	case P_R2:        type = "P_R2";        break;
460 466
 	case P_MADDR:     type = "P_MADDR";     break;
467
+	case P_TTL:       type = "P_TTL";       break;
461 468
 	default:          type = "UNKNOWN";     break;
462 469
 	}
463 470
 	
... ...
@@ -50,7 +50,8 @@ typedef enum ptype {
50 50
 	P_TRANSPORT, /* URI: transport parameter */
51 51
 	P_LR,        /* URI: lr parameter */
52 52
 	P_R2,        /* URI: r2 parameter (ser specific) */
53
-	P_MADDR      /* URI: maddr parameter */
53
+	P_MADDR,     /* URI: maddr parameter */
54
+	P_TTL,       /* URI: ttl parameter */
54 55
 } ptype_t;
55 56
 
56 57
 
... ...
@@ -94,6 +95,7 @@ struct uri_hooks {
94 95
 	struct param* lr;        /* lr parameter */
95 96
 	struct param* r2;        /* r2 parameter */
96 97
 	struct param* maddr;     /* maddr parameter */
98
+	struct param* ttl;       /* ttl parameter */
97 99
 };
98 100
 
99 101