SipMsg.java 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. package org.siprouter;
  2. import java.lang.*;
  3. public abstract class SipMsg
  4. {
  5. /* Constructor. Do not remove !!! */
  6. public SipMsg()
  7. {
  8. }
  9. public int id; // message id, unique/process
  10. public int pid; // process id
  11. public String eoh; // pointer to the end of header (if found) or null
  12. public String unparsed; // here we stopped parsing
  13. public String buf; // scratch pad, holds a modified message, via, etc. point into it
  14. public int len; // message len (orig)
  15. public String new_uri; // changed first line uri, when you change this
  16. public String dst_uri; // Destination URI, must be forwarded to this URI if dst_url lenght != 0
  17. public int parsed_uri_ok; // 1 if parsed_orig_uri is valid, 0 if not, set if to 0 if you modify the uri (e.g change new_uri)
  18. public int parsed_orig_ruri_ok; // 1 if parsed_orig_uri is valid, 0 if not, set if to 0 if you modify the uri (e.g change new_uri)
  19. public String add_to_branch_s; // whatever whoever want to append to branch comes here
  20. public int add_to_branch_len;
  21. public int hash_index; // index to TM hash table; stored in core to avoid unnecessary calculations
  22. public int msg_flags; /* flags used by core. Allows to set various flags on the message; may be used for
  23. simple inter-module communication or remembering processing state reached */
  24. public String set_global_address;
  25. public String set_global_port;
  26. public static native SipMsg ParseSipMsg();
  27. public static native String getMsgType();
  28. public static native String getStatus();
  29. public static native String getRURI();
  30. public static native IPPair getSrcAddress();
  31. public static native IPPair getDstAddress();
  32. public static native String getBuffer();
  33. }