Browse code

- ftag parameter support

Jan Janak authored on 25/12/2005 18:43:17
Showing 2 changed files
... ...
@@ -164,6 +164,14 @@ static inline void parse_uri_class(param_hooks_t* _h, param_t* _p)
164 164
 			_h->uri.dstport = _p;
165 165
 		}
166 166
 		break;
167
+	case 'f':
168
+	case 'F':
169
+		if ((_p->name.len == 4) &&
170
+		    (!strncasecmp(_p->name.s + 1, "tag", 3))) {
171
+			_p->type = P_FTAG;
172
+			_h->uri.ftag = _p;
173
+		}
174
+		break;
167 175
 	}
168 176
 
169 177
 }
... ...
@@ -499,6 +507,7 @@ static inline void print_param(FILE* _o, param_t* _p)
499 507
 	case P_DSTIP:     type = "P_DSTIP";     break;
500 508
 	case P_DSTPORT:   type = "P_DSTPORT";   break;
501 509
 	case P_INSTANCE:  type = "P_INSTANCE";  break;
510
+	case P_FTAG:      type = "P_FTAG";      break;
502 511
 	default:          type = "UNKNOWN";     break;
503 512
 	}
504 513
 	
... ...
@@ -56,6 +56,7 @@ typedef enum ptype {
56 56
 	P_DSTIP,     /* URI: dstip parameter */
57 57
 	P_DSTPORT,   /* URi: dstport parameter */
58 58
 	P_INSTANCE,  /* Contact: sip.instance parameter */
59
+	P_FTAG       /* URI: ftag parameter */
59 60
 } ptype_t;
60 61
 
61 62
 
... ...
@@ -104,6 +105,7 @@ struct uri_hooks {
104 105
 	struct param* ttl;       /* ttl parameter */
105 106
 	struct param* dstip;     /* Destination IP */
106 107
 	struct param* dstport;   /* Destination port */
108
+	struct param* ftag;      /* From tag in the original request */
107 109
 };
108 110
 
109 111