MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Session Initiation Protocol Library Functions
                                             sipissipuri(3SIP)



NAME
     sipissipuri,    sipgeturischeme,     sipgeturihost,
     sipgeturiuser,   sipgeturipassword,  sipgeturiport,
     sipgeturiparams, sipgeturiheaders, sipgeturiopaque,
     sipgeturiquery,   sipgeturipath,  sipgeturiregname,
     sipisuriteluser,                    sipgeturierrflags,
     sipurierrflagstostr - get URI related attributes

SYNOPSIS
     cc [ flag ... ] file ... -lsip [ library ... ]
     #include 

     booleant sipissipuri(const struct sipuri *sipuri);


     const sipstrt *sipgeturischeme(const struct sipuri *sipuri,
          int *error);


     const sipstrt *sipgeturiuser(const struct sipuri *sipuri,
          int *error);


     const sipstrt *sipgeturipassword(const struct sipuri *sipuri,
          int *error);


     const sipstrt *sipgeturihost(const struct sipuri *sipuri,
          int *error);


     int sipgeturiport(const struct sipuri *sipuri,
          int *error);


     const sipparamt *sipgeturiparams(const struct sipuri *sipuri,
          int *error);


     const sipstrt *sipgeturiheaders(const struct sipuri *sipuri,
          int *error);


     const sipstrt *sipgeturiopaque(const struct sipuri *sipuri,
          int *error);


     const sipstrt *sipgeturiquery(const struct sipuri *sipuri,
          int *error);





SunOS 5.11          Last change: 10 Feb 2007                    1






Session Initiation Protocol Library Functions
                                             sipissipuri(3SIP)



     const sipstrt *sipgeturipath(const struct sipuri *sipuri,
          int *error);


     const sipstrt *sipgeturiregname(const struct sipuri *sipuri,
          int *error);


     booleant sipisuriteluser(const struct sipuri *sipuri);


     int sipgeturierrflags(const struct sipuri *sipuri,
          int *error);


     char *sipurierrflagstostr(int urierrflags);


DESCRIPTION
     For functions that  return  a  pointer  of  type  sipstrt,
     sipstrt is supplied by:

       typedef struct sipstr {
            char *sipstrptr;
            int  sipstrlen;
       }sipstrt;



     The  sipstrptr  parameter  points  to  the  start  of  the
     returned  value  and  sipstrlen supplies the length of the
     returned value.


     For example, given the following request line in a SIP  mes-
     sage input to sipgetrequesturistr():

       INVITE sip:marconi@radio.org SIP/2.0



     the return is a pointer to sipstrt  with  the  sipstrptr
     member   pointing   to   "s"  of  sip:marconi@radio.org  and
     sipstrlen   being   set   to    21,    the    length    of
     sip:marconi@radio.org.


     The sipissipuri() function takes a parsed URI sipuri and
     returns  BTRUE  if  it is a SIP[S] URI and BFALSE if it is
     not. A URI is a SIP[S] URI if  the  scheme  in  the  URI  is
     either "sip" or "sips".



SunOS 5.11          Last change: 10 Feb 2007                    2






Session Initiation Protocol Library Functions
                                             sipissipuri(3SIP)



     The sipgeturiuser() function takes a parsed  URI  sipuri
     and returns the value of the "user" component, if present.


     The  sipgeturipassword()  function  takes  a  parsed  URI
     sipuri  and  returns the value of the "password" component,
     if present.


     The sipgeturihost() function takes a parsed  URI  sipuri
     and returns the value of the "host" component, if present.


     The sipgeturiport() function takes a parsed  URI  sipuri
     and returns the value of the "port" component, if present.


     The sipgeturiparams() function takes a parsed URI sipuri
     and  returns  the list of URI parameters, if present, from a
     SIP[S] URI.


     The  sipgeturiheaders()  function  takes  a  parsed   URI
     sipuri and returns 'headers' from a SIP[S] URI.


     The sipgeturiquery() function takes a parsed URI  sipuri
     and returns the value of the 'query' component, if present.


     The sipgeturipath() function takes a parsed  URI  sipuri
     and returns the value of the 'path' component, if present.


     The  sipgeturiregname()  function  takes  a  parsed   URI
     sipuri and returns the value of the 'regname' component, if
     present.


     The sipisuriteluser() function returns BTRUE if the user
     component  is  a telephone-subscriber. Otherwise, BFALSE is
     returned.


     The sipgeturierrflags() function returns the error  flags
     from  a  parsed URI sipuri. The returned value is a bitmask
     with   the   appropriate   bit   set   when   the    parser,
     sipparseuri(),  encounters an error. The following are the
     possible error values that could be set:

       Bit value      Error                 Comments



SunOS 5.11          Last change: 10 Feb 2007                    3






Session Initiation Protocol Library Functions
                                             sipissipuri(3SIP)



       
       0x00000001     SIPURIERSCHEME     invalid scheme
       0x00000002     SIPURIERUSER       invalid user name
       0x00000004     SIPURIERPAS       invalid password
       0x00000008     SIPURIERHOST       invalid host
       0x00000010     SIPURIERPORT       invalid port number
       0x00000020     SIPURIERPARAM      invalid URI parameters
       0x00000040     SIPURIERHEADER     invalid URI headers
       0x00000080     SIPURIEROPAQUE     invalid opaque
       0x00000100     SIPURIERQUERY      invalid query
       0x00000200     SIPURIERPATH       invalid path
       0x00000400     SIPURIEREGNAME    invalid reg-name



     The sipurierrflagstostr() function takes the error flags
     from  a  parsed  URI sipuri and forms a string with all the
     error bits that are set. For example, if SIPURIERPAS and
     SIPURIERPORT  are  set  in  a  parsed  URI  sipuri,  the
     sipurierrflagstostr() function returns a string such as:

       "Error(s) in PASWORD, PORT part(s)"



     The caller is responsible for freeing the returned string.

RETURN VALUES
     The        sipgeturischeme(),         sipgeturiuser(),
     sipgeturipassword(),                  sipgeturihost(),
     sipgeturiparams(),                 sipgeturiheaders(),
     sipgeturiopaque(),                   sipgeturiquery(),
     sipgeturipath(),        sipgeturiregname(),        and
     sipurierrflagstostr()  functions  return  the  requested
     value on success and NUL on failure.


     The sipgeturiport() function returns port from the URI or
     0  if  the port is not present. The returned port is in host
     byte order.


     The value of errno is not changed  by  these  calls  in  the
     event of an error.

ERORS
     If the error is non-null, the following value is set:

     EINVAL    The SIP header value of the SIP message is NUL or
               there is no URI.




SunOS 5.11          Last change: 10 Feb 2007                    4






Session Initiation Protocol Library Functions
                                             sipissipuri(3SIP)



               The input URI is null or the  requested  URI  com-
               ponent  is  invalid. The error flag is set for the
               requested component.

               The URI parameters or headers are requested from a
               non-SIP[S]  URI; or the 'opaque', 'query', 'path',
               'reg-name' components are requested from a  SIP[S]
               URI.



     On success, the value of the location pointed to by error is
     set to 0.

ATRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:



     
           ATRIBUTE TYPE               ATRIBUTE VALUE       
    
     Interface Stability          Committed                   
    
     MT-Level                     MT-Safe                     
    


SEE ALSO
     libsip(3LIB)























SunOS 5.11          Last change: 10 Feb 2007                    5






Session Initiation Protocol Library Functions
                                             sipissipuri(3SIP)






















































SunOS 5.11          Last change: 10 Feb 2007                    6






OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™