1sdp_find_attCroimbmuutnei(c3aCtOiMoMnPUPTrIoLt)ocol Parser UtilitiessdpL_ifbirnadr_yatFturnicbtuitoen(s3COMMPUTIL)
2
3
4
6 sdp_find_attribute - find the attribute from the attribute list
7
9 cc [ flag...] file... -lcommputil [ library...]
10 #include <sdp.h>
11
12 sdp_attr_t *sdp_find_attribute(sdp_attr_t *attr, const char *name);
13
14
16 The sdp_find_attribute() function searches the attribute list attr for
17 the specified attribute name. If the attribute is found it returns the
18 pointer to that attribute. Otherwise it returns NULL.
19
21 The sdp_find_attribute() function returns the attribute (sdp_attr_t *)
22 on success and NULL when the search fails or when mandatory input
23 parameters are NULL.
24
26 Example 1 An (incomplete) SDP description that contains one media sec‐
27 tion: audio.
28
29 m=audio 49170 RTP/AVP 0 8
30 a=rtpmap:0 PCMU/8000
31 a=rtpmap:8 PCMA/8000
32 a=sendonly
33 a=ptime:10000
34 a=maxptime:20000
35
36 /*
37 * Assuming that above description is parsed using sdp_parse and that
38 * the parsed structure is in "session" sdp_session_t structure.
39 */
40
41 sdp_attr_t *ptime;
42 sdp_attr_t *max_ptime;
43 sdp_media_t *media = session->s_media;
44
45 if ((ptime = sdp_find_attribute(media->m_attr, "ptime")) == NULL)
46 /* ptime attribute not present */
47 else if((max_ptime = sdp_find_attribute(media->m_attr,
48 "maxptime")) == NULL)
49 /* max_ptime attribute not present */
50
51
53 See attributes(5) for descriptions of the following attributes:
54
55
56
57
58 ┌─────────────────────────────┬─────────────────────────────┐
59 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
60 ├─────────────────────────────┼─────────────────────────────┤
61 │Interface Stability │Committed │
62 ├─────────────────────────────┼─────────────────────────────┤
63 │MT-Level │Safe │
64 └─────────────────────────────┴─────────────────────────────┘
65
67 libcommputil(3LIB), sdp_parse(3COMMPUTIL), attributes(5)
68
69
70
71SunOS 5.11 12 Oct 2007 sdp_find_attribute(3COMMPUTIL)