[reSIProcate] how to generate HeaderHash.cxx on Win32

liu noiile noiile at hotmail.com
Mon Dec 19 07:53:24 CST 2005


I Want to add a new Header, but I don't know how to used gperf generate 
HeaderHash.cxx on Win32.

I type "gperf -D --enum -E -L C++ -t -k '*' --compare-strncmp -Z HeaderHash 
--output-file HeaderHash.cxx HeaderHash.gperf" in cmd. and build my test 
program, but the result is not correct.

This is my test program, Kao is new header, and it is single header:
      Data txt("INVITE sip:192.168.2.92:5100;q=1 SIP/2.0\r\n"
               "To: <sip:yiwen at whistler.gloo.net>\r\n"
               "From: Jason 
Fischl<sip:jason at whistler.gloo.net>;tag=ba1aee2d\r\n"
               "Kao: hello\r\n"
               "\r\n");

      auto_ptr<SipMessage> msg(SipMessage::make(txt));

      cout << *msg << endl << endl;
      Data myStr("what");
      msg->header(h_Kao).value() = myStr;
      cout << *msg;

The output is:

INVITE sip:192.168.2.92:5100;q=1 SIP/2.0
Content-Length: 0
To: <sip:yiwen at whistler.gloo.net>
From: Jason Fischl<sip:jason at whistler.gloo.net>;tag=ba1aee2d
Kao: hello



INVITE sip:192.168.2.92:5100;q=1 SIP/2.0
Kao: what
Content-Length: 0
To: <sip:yiwen at whistler.gloo.net>
From: Jason Fischl<sip:jason at whistler.gloo.net>;tag=ba1aee2d
Kao: hello





More information about the resiprocate-devel mailing list