Sponsored Content
Top Forums Programming Which C++ book do you recommend? Post 302637991 by hadi0x7c7 on Wednesday 9th of May 2012 04:31:38 PM
Old 05-09-2012
Thinking in C Seminar then
Thinking in C++

Both of them are free !
 

10 More Discussions You Might Find Interesting

1. IP Networking

Please recommend me a Book

I have a SCO OpenServer 5 and I'll like to know about a Very good Book for Unix Networking that can help me with this server or any good book about Unix Networking. Thanks! (2 Replies)
Discussion started by: SuPeRbYtE
2 Replies

2. Programming

Recommend Books

Can anybody recommend a good (& maybe cheap :D ) book for c-prg in HP-UX. I a little rusty & most of expr is in PC world. (1 Reply)
Discussion started by: vslewis
1 Replies

3. Solaris

recommend a terminal concentrator

I remember in the past we had those nifty little nortel boxes for remote console terminal concentrators where you can telnet to them and select port and it will be as though you sitting infront of the server console. I can't seem to find any of those now. :confused: I want something that when... (6 Replies)
Discussion started by: sparcguy
6 Replies

4. UNIX and Linux Applications

What Database engine would you recommend?

Thank you for choosing this thread to read. I am about to develop a heavy set financial system. My client wants to build his own in-house. Due to my LAMP/BSD mind set, I know MySQL, but no other database (never got the chance to see others). I do not know if MySQL can handle 2000 to 5000 records... (3 Replies)
Discussion started by: sad_angle
3 Replies

5. Shell Programming and Scripting

Can anyone recommend a book for perl WIN32

Is there a book available that goes into the PERL WIN32 module in depth ? I like the Unix in a nutshell or Perl Black Book by Holzner way of teaching. Teach by example. Anyone ? Thanks Popeye, Olive and sweetpea :p (1 Reply)
Discussion started by: popeye
1 Replies

6. UNIX for Dummies Questions & Answers

Pls recommend a telnet session

hi guys, currently i'm using putty and hyper terminal in my telnet session mostly on hp servers. problem is when im trying to use putty to connect with the mp console im unable to connect because im using a usb-to-serial cable & putty only configured to com1. reason for this is i want to save... (2 Replies)
Discussion started by: gob23g
2 Replies

7. Shell Programming and Scripting

recommend book for unix command/ shell scripting

Hi, i wish to learn unix commands and shell scripting. platform is solaris. but i am focused more on handy unix commands than system administration. which books do you recommend? (1 Reply)
Discussion started by: nurulamin862
1 Replies

8. UNIX for Dummies Questions & Answers

Please recommend a good Unix or Linux book

I looking to broaden my knowledge in Unix/Linux. I have taken some basic classes in the past and tinkered a little with operating system at home.. What i am looking for is if someone could suggest a good book or class or both to help out. Looking at getting a Unix or Linux Certification. I work... (7 Replies)
Discussion started by: harlemi
7 Replies

9. Shell Programming and Scripting

shell books recommend

Now i'm reading <Advanced Bash scripting Guide> and that book lists too many examples and show little explanations.That makes me feel confused.Do any1 has some better book recommend to me about Bash? (4 Replies)
Discussion started by: homeboy
4 Replies

10. UNIX for Advanced & Expert Users

I need a recent book about CUPS - can someone recommend me one?

Hello all :) since cups 2.2.7 on Ubuntu 18.04 some (not) nice things changed, i would prefer a book for CUPS. Can someone recommend me one? I searched for, but find only very very old books, over 10 years old. If possible I am also satisfied with a good and understandable documentation... (2 Replies)
Discussion started by: darktux
2 Replies
sdp_add_origin(3COMMPUTIL)		     Communication Protocol Parser Utilities Library Functions			sdp_add_origin(3COMMPUTIL)

NAME
sdp_add_origin, sdp_add_name, sdp_add_information, sdp_add_uri, sdp_add_email, sdp_add_phone, sdp_add_connection, sdp_add_bandwidth, sdp_add_repeat, sdp_add_time, sdp_add_zone, sdp_add_key, sdp_add_attribute, sdp_add_media - add specific SDP fields to the SDP session structure SYNOPSIS
cc [ flag...] file... -lcommputil [ library...] #include <sdp.h> int sdp_add_origin(sdp_session_t *session, const char *name, uint64_t id, uint64_t ver, const char *nettype, const char *addrtype, const char *address); int sdp_add_name(sdp_session_t *session, const char *name); int sdp_add_information(char **information, const char *value); int sdp_add_uri(sdp_session_t *session, const char *uri); int sdp_add_email(sdp_session_t *session, const char *email); int sdp_add_phone(sdp_session_t *session, const char *phone); int sdp_add_connection(sdp_conn_t **conn, const char *nettype, const char *addrtype, const char *address, uint8_t ttl, int addrcount); int sdp_add_bandwidth(sdp_bandwidth_t **bw, const char *type, uint64_t value); int sdp_add_repeat(sdp_time_t *time, uint64_t interval, uint64_t duration, const char *offset); int sdp_add_time(sdp_session_t *session, uint64_t starttime, uint64_t stoptime, sdp_time_t **time); int sdp_add_zone(sdp_session_t *session, uint64_t time, const char *offset); int sdp_add_key(sdp_key_t **key, const char *method, const char *enckey); int sdp_add_attribute(sdp_attr_t **attr, const char *name, const char *value); int sdp_add_media(sdp_session_t *session, const char *name, uint_t port, int portcount, const char *protocol, const char *format, sdp_media_t **media); DESCRIPTION
The caller has to first call sdp_new_session(3COMMPUTIL) and get pointer to a session structure. Then that pointer is used as argument in the following functions and the session structure is constructed. Once the structure is built the caller converts it to a string represen- tation using sdp_session_to_str(3COMMPUTIL). The sdp_add_origin() function adds ORIGIN (o=) SDP field to the session structure (sdp_session_t) using name, id, ver, nettype, addrtype, and address. The sdp_add_name() function adds NAME (s=) SDP field to the session structure (sdp_session_t) using name. The sdp_add_information() function adds INFO (i=) SDP field to the session structure (sdp_session_t) or media structure (sdp_media_t) using value. Since this field can be either in the media section or the session section of an SDP description the caller has to pass &ses- sion->s_info or &media->m_info as the first argument. The sdp_add_uri() function adds URI (u=) SDP field to the session structure (sdp_session_t) using uri. The sdp_add_email() function adds EMAIL (e=) SDP field to the session structure (sdp_session_t) using email. The sdp_add_phone() function adds PHONE (p=) SDP field to the session structure (sdp_session_t) using phone. The sdp_add_connection() function adds CONNECTION (c=) SDP field to the session structure (sdp_session_t) or the media structure (sdp_media_t) using nettype, addrtype, address, ttl, and addrcount. While adding an IP4 or IP6 unicast address the ttl and addrcount should be set to 0. For multicast address the ttl should be set a reasonable value (0 - 255) and addrcount cannot be 0. Also since this field can be either in the media section or the session section of an SDP description, the caller has to pass &session->s_conn or &media->m_conn as the first argument. The sdp_add_bandwidth() function adds BANDWIDTH (b=) SDP field to the session structure (sdp_session_t) or the media structure (sdp_media_t) using type and value. Since this field can be either in the media section or the session section of an SDP description, the caller has to pass &session->s_bw or &media->m_bw as the first argument. The sdp_add_time() function adds the TIME (t=) SDP field to the session structure using startime and stoptime. The pointer to the newly created time structure is returned in time. This pointer is then used in sdp_add_repeat() function. The sdp_add_repeat() function adds the REPEAT (r=) SDP field to the session structure using interval, duration and offset. Here, offset is a string holding one or more offset values, for example "60" or "60 1d 3h". The sdp_add_zone() function adds the ZONE (z=) SDP field to the session structure using time and offset. To add multiple time and offset values in a single zone field, call this function once for each pair. See the example below. The sdp_add_key() function adds the KEY (k=) SDP field to the session structure (sdp_session_t) or media structure (sdp_media_t) using method and enckey. Since this field can be either in the media section or the session section of an SDP description, the caller has to pass &session->s_key or &media->m_key as the first argument. The sdp_add_attribute() function adds the ATTRIBUTE (a=) SDP field to the session structure (sdp_session_t) or media structure (sdp_media_t) using name and value. Since this field can be either in the media section or the session section of an SDP description, the caller has to pass &session->s_attr or &media->m_attr as the first argument. The sdp_add_media() function adds the MEDIA (m=) SDP field to the session structure (sdp_session_t) using name, port, portcount, protocol, and format. Here, format is a string holding possibly more than one value, for example, "0 31 32 97". The pointer to the newly created media structure is returned in media. This pointer is then used to add SDP fields specific to that media section. RETURN VALUES
These functions return 0 on success and the appropriate error value on failure. The value of errno is not changed by these calls in the event of an error. ERRORS
These functions will fail if: EINVAL Mandatory parameters are not provided (they are null). ENOMEM The allocation of memory failed. EXAMPLES
Example 1 Build an SDP session structure In the following example we see how to build an SDP session structure using the functions described on this manual page. We first get a pointer to sdp_session_t structure by calling sdp_new_session(). Then to this newly created structure we add various SDP fields. Once the structure is built we obtain a string representation of the structure using sdp_session_to_str() function. Since its caller responsibility to free the session we call sdp_free_session() towards the end. /* SDP Message we will be building "v=0 o=Alice 2890844526 2890842807 IN IP4 10.47.16.5 s=- i=A Seminar on the session description protocol u=http://www.example.com/seminars/sdp.pdf e=alice@example.com (Alice Smith) p=+1 911-345-1160 c=IN IP4 10.47.16.5 b=CT:1024 t=2854678930 2854679000 r=604800 3600 0 90000 z=2882844526 -1h 2898848070 0h a=recvonly m=audio 49170 RTP/AVP 0 i=audio media b=CT:1000 k=prompt m=video 51372 RTP/AVP 99 90 i=video media a=rtpmap:99 h232-199/90000 a=rtpmap:90 h263-1998/90000 " */ #include stdio.h> #include string.h> #include errno.h> #include sdp.h> int main () { sdp_session_t *my_sess; sdp_media_t *my_media; sdp_time_t *my_time; char *b_sdp; my_sess = sdp_new_session(); if (my_sess == NULL) { return (ENOMEM); } my_sess->version = 0; if (sdp_add_name(my_sess, "-") != 0) goto err_ret; if (sdp_add_origin(my_sess, "Alice", 2890844526ULL, 2890842807ULL, "IN", "IP4", "10.47.16.5") != 0) goto err_ret; if (sdp_add_information(&my_sess->s_info, "A Seminar on the session" "description protocol") != 0) goto err_ret; if (sdp_add_uri (my_sess, "http://www.example.com/seminars/sdp.pdf") != 0) goto err_ret; if (sdp_add_email(my_sess, "alice@example.com (Alice smith)") != 0) goto err_ret; if (sdp_add_phone(my_sess, "+1 911-345-1160") != 0) goto err_ret; if (sdp_add_connection(&my_sess->s_conn, "IN", "IP4", "10.47.16.5", 0, 0) != 0) goto err_ret; if (sdp_add_bandwidth(&my_sess->s_bw, "CT", 1024) != 0) goto err_ret; if (sdp_add_time(my_sess, 2854678930ULL, 2854679000ULL, &my_time) != 0) goto err_ret; if (sdp_add_repeat(my_time, 604800ULL, 3600ULL, "0 90000") != 0) goto err_ret; if (sdp_add_zone(my_sess, 2882844526ULL, "-1h") != 0) goto err_ret; if (sdp_add_zone(my_sess, 2898848070ULL, "0h") != 0) goto err_ret; if (sdp_add_attribute(&my_sess->s_attr, "sendrecv", NULL) != 0) goto err_ret; if (sdp_add_media(my_sess, "audio", 49170, 1, "RTP/AVP", "0", &my_media) != 0) goto err_ret; if (sdp_add_information(&my_media->m_info, "audio media") != 0) goto err_ret; if (sdp_add_bandwidth(&my_media->m_bw, "CT", 1000) != 0) goto err_ret; if (sdp_add_key(&my_media->m_key, "prompt", NULL) != 0) goto err_ret; if (sdp_add_media(my_sess, "video", 51732, 1, "RTP/AVP", "99 90", &my_media) != 0) goto err_ret; if (sdp_add_information(&my_media->m_info, "video media") != 0) goto err_ret; if (sdp_add_attribute(&my_media->m_attr, "rtpmap", "99 h232-199/90000") != 0) goto err_ret; if (sdp_add_attribute(&my_media->m_attr, "rtpmap", "90 h263-1998/90000") != 0) goto err_ret; b_sdp = sdp_session_to_str(my_sess, &error); /* * b_sdp is the string representation of my_sess structure */ free(b_sdp); sdp_free_session(my_sess); return(0); err_ret: free(b_sdp); sdp_free_session(my_sess); return(1); } ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Committed | +-----------------------------+-----------------------------+ |MT-Level |Safe | +-----------------------------+-----------------------------+ SEE ALSO
libcommputil(3LIB), sdp_new_session(3COMMPUTIL), sdp_parse(3COMMPUTIL), sdp_session_to_str(3COMMPUTIL), attributes(5) SunOS 5.11 12 Oct 2007 sdp_add_origin(3COMMPUTIL)
All times are GMT -4. The time now is 10:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy