So with the custom protocol I'm writing there are a lot of properties that need to be added to the hf array. I was wondering if it's possible to add items to it as I'm parsing the packet. That is, not every packet will have a header for every single property so I would only add the ones that are present. asked 14 Feb '11, 15:13 Rodayo edited 14 Feb '11, 15:14 |
One Answer:
The short answer: All the needed hf[] entries should be specified in the proto_register function. Even it might be possible to do late registration, I don't think anything is really gained and your code would definitely be more complex. answered 14 Feb '11, 22:46 Bill Meier ♦♦ |
Actually, I looked at packet-http.c and it looked like that file was doing just what I was proposing. I followed it as a guideline and it seems to have worked without any problems. Thanks anyways =]