1component_class: LIB_SHARED
2component_type: BIONIC_LIBC
3component_type_version_major: 1
4component_type_version_minor: 0
5component_name: "libc"
6
7header: "<unistd.h>"
8header: "<stdint.h>"
9header: "<sys/types.h>"
10header: "<linux/socket.h>"
11
12interface: {
13  api: {
14    name: "socket"
15    return_type: {
16      type: TYPE_SCALAR
17      scalar_type: "int32_t"
18    }
19    arg: {
20      type: TYPE_SCALAR
21      scalar_type: "int32_t"
22    }
23    arg: {
24      type: TYPE_SCALAR
25      scalar_type: "int32_t"
26    }
27    arg: {
28      type: TYPE_SCALAR
29      scalar_type: "int32_t"
30    }
31  }
32
33  api: {
34    name: "accept"
35    return_type: {
36      type: TYPE_SCALAR
37      scalar_type: "int32_t"
38    }
39    arg: {
40      type: TYPE_SCALAR
41      scalar_type: "int32_t"
42    }
43    arg: {
44      type: TYPE_PREDEFINED
45      scalar_type: "pointer"
46      predefined_type: "struct sockaddr*"
47    }
48    arg: {
49      type: TYPE_PREDEFINED
50      scalar_type: "pointer"
51      predefined_type: "socklen_t*"
52    }
53  }
54
55  api: {
56    name: "bind"
57    return_type: {
58      type: TYPE_SCALAR
59      scalar_type: "int32_t"
60    }
61    arg: {
62      type: TYPE_SCALAR
63      scalar_type: "int32_t"
64    }
65    arg: {
66      type: TYPE_PREDEFINED
67      scalar_type: "pointer"
68      predefined_type: "struct sockaddr*"
69    }
70    arg: {
71      type: TYPE_PREDEFINED
72      scalar_type: "pointer"
73      predefined_type: "socklen_t*"
74    }
75  }
76
77  api: {
78    name: "connect"
79    return_type: {
80      type: TYPE_SCALAR
81      scalar_type: "int32_t"
82    }
83    arg: {
84      type: TYPE_SCALAR
85      scalar_type: "int32_t"
86    }
87    arg: {
88      type: TYPE_PREDEFINED
89      scalar_type: "pointer"
90      predefined_type: "struct sockaddr*"
91    }
92    arg: {
93      type: TYPE_PREDEFINED
94      scalar_type: "pointer"
95      predefined_type: "socklen_t*"
96    }
97  }
98
99  api: {
100    name: "listen"
101    return_type: {
102      type: TYPE_SCALAR
103      scalar_type: "int32_t"
104    }
105    arg: {
106      type: TYPE_SCALAR
107      scalar_type: "int32_t"
108    }
109    arg: {
110      type: TYPE_SCALAR
111      scalar_type: "int32_t"
112    }
113  }
114
115  api: {
116    name: "recv"
117    return_type: {
118      type: TYPE_SCALAR
119      scalar_type: "int32_t"
120    }
121    arg: {
122      type: TYPE_SCALAR
123      scalar_type: "int32_t"
124    }
125    arg: {
126      type: TYPE_SCALAR
127      scalar_type: "void_pointer"
128    }
129    arg: {
130      type: TYPE_SCALAR
131      scalar_type: "uint32_t"
132    }
133    arg: {
134      type: TYPE_SCALAR
135      scalar_type: "int32_t"
136    }
137  }
138
139  api: {
140    name: "send"
141    return_type: {
142      type: TYPE_SCALAR
143      scalar_type: "int32_t"
144    }
145    arg: {
146      type: TYPE_SCALAR
147      scalar_type: "int32_t"
148    }
149    arg: {
150      type: TYPE_SCALAR
151      scalar_type: "void_pointer"
152    }
153    arg: {
154      type: TYPE_SCALAR
155      scalar_type: "uint32_t"
156    }
157    arg: {
158      type: TYPE_SCALAR
159      scalar_type: "int32_t"
160    }
161  }
162
163  api: {
164    name: "fopen"
165    return_type: {
166      type: TYPE_PREDEFINED
167      scalar_type: "pointer"
168      predefined_type: "FILE*"
169    }
170    arg: {
171      type: TYPE_SCALAR
172      scalar_type: "char_pointer"
173      name: "filename"
174    }
175    arg: {
176      type: TYPE_SCALAR
177      scalar_type: "char_pointer"
178      name: "opentype"
179    }
180  }
181
182  api: {
183    name: "read"
184    return_type: {
185      type: TYPE_SCALAR
186      scalar_type: "int32_t"
187    }
188    arg: {
189      type: TYPE_SCALAR
190      scalar_type: "int32_t"
191      name: "filedes"
192    }
193    arg: {
194      type: TYPE_SCALAR
195      scalar_type: "void_pointer"
196      name: "buffer"
197    }
198    arg: {
199      type: TYPE_SCALAR
200      scalar_type: "uint32_t"
201      name: "size"
202    }
203  }
204
205  api: {
206    name: "write"
207    return_type: {
208      type: TYPE_SCALAR
209      scalar_type: "int32_t"
210    }
211    arg: {
212      type: TYPE_SCALAR
213      scalar_type: "int32_t"
214      name: "filedes"
215    }
216    arg: {
217      type: TYPE_SCALAR
218      scalar_type: "void_pointer"
219      name: "buffer"
220    }
221    arg: {
222      type: TYPE_SCALAR
223      scalar_type: "int32_t"
224      name: "size"
225    }
226  }
227
228  api: {
229    name: "lseek"
230    return_type: {
231      type: TYPE_SCALAR
232      scalar_type: "int32_t"
233    }
234    arg: {
235      type: TYPE_SCALAR
236      scalar_type: "int32_t"
237      name: "filedes"
238    }
239    arg: {
240      type: TYPE_SCALAR
241      scalar_type: "int32_t"
242      name: "offset"
243    }
244    arg: {
245      type: TYPE_SCALAR
246      scalar_type: "int32_t"
247      name: "whence"
248    }
249  }
250
251  api: {
252    name: "close"
253    return_type: {
254      type: TYPE_SCALAR
255      scalar_type: "int32_t"
256    }
257    arg: {
258      type: TYPE_SCALAR
259      scalar_type: "int32_t"
260      name: "filedes"
261    }
262  }
263
264  attribute: {
265    name: "sockaddr"
266    type: TYPE_STRUCT
267    struct_value: {
268      name: "sa_family"
269      type: TYPE_SCALAR
270      scalar_type: "uint32_t"
271    }
272    struct_value: {
273      name: "sa_data"
274      type: TYPE_ARRAY
275      vector_value: {
276        type: TYPE_SCALAR
277        scalar_type: "char"
278      }
279    }
280  }
281
282  attribute: {
283    name: "PF_UNIX"
284    type: TYPE_SCALAR
285    scalar_type: "int32_t"
286    scalar_value: {
287      int32_t: 1
288    }
289    is_const: true
290  }
291
292  attribute: {
293    name: "PF_INET"
294    type: TYPE_SCALAR
295    scalar_type: "int32_t"
296    scalar_value: {
297      int32_t: 2
298    }
299    is_const: true
300  }
301
302  attribute: {
303    name: "SOCK_STREAM"
304    type: TYPE_SCALAR
305    scalar_type: "int32_t"
306    scalar_value: {
307      int32_t: 1
308    }
309    is_const: true
310  }
311
312  attribute: {
313    name: "SOCK_DGRAM"
314    type: TYPE_SCALAR
315    scalar_type: "int32_t"
316    scalar_value: {
317      int32_t: 2
318    }
319    is_const: true
320  }
321
322  attribute: {
323    name: "SOCK_RAW"
324    type: TYPE_SCALAR
325    scalar_type: "int32_t"
326    scalar_value: {
327      int32_t: 3
328    }
329    is_const: true
330  }
331
332  attribute: {
333    name: "SOCK_SEQPACKET"
334    type: TYPE_SCALAR
335    scalar_type: "int32_t"
336    scalar_value: {
337      int32_t: 5
338    }
339    is_const: true
340  }
341}
342