Commit graph

28 commits

Author SHA1 Message Date
zijunzhao
87aae5309b Nullability check for if module.
Bugs: b/245972273
Test: adb shell
Change-Id: If6be7027e0ebdcf68ae4062c57e1c4e82a767abe
2023-05-11 17:15:57 +00:00
Elliott Hughes
dd6763a6c6 Another round of documentation.
Bug: N/A
Test: N/A
Change-Id: I1b818fbb36ddd6d084dee56828290c2717a0c9b0
2018-10-04 16:35:13 -07:00
Elliott Hughes
ff26a16c1d Re-submit "Name function arguments in libc headers for Studio."
This reverts commit 9af9120091 (a revert
of 079bff4fa5), now the versioner bug is
fixed.

Bug: http://b/64613623 # header bug
Bug: http://b/64802958 # versioner bug
Change-Id: I1cb9d7832d4b3aecdc57a9285e2291443e59d02d
2017-08-18 00:00:38 +00:00
Colin Cross
9af9120091 Revert "Name function arguments in libc headers for Studio."
This reverts commit 079bff4fa5.

Broke builds with SANITIZE_HOST=address with an asan failure in versioner.

Change-Id: I22b113fd5405589d1a25e5e137c450aaba1ade5f
2017-08-17 18:29:54 +00:00
Elliott Hughes
079bff4fa5 Name function arguments in libc headers for Studio.
Second batch of headers...

Bug: http://b/64613623
Test: builds
Change-Id: I8eef043dbf32afee8ff814e9d005f46aee8fa21f
2017-08-16 16:30:54 -07:00
Elliott Hughes
203e13d97d Always include <sys/cdefs.h>.
I made a mistake caught by code review earlier, so let's try to be
safer by default.

This patch also moves all our "forwarding" headers to the guardless
just-include-the-other-thing style that we usually use. (Where we
have a comment explaining where the header comes from, I've kept
that.)

Change-Id: I37342cf5e2563c6a269b2ba61a697069b1c7913b
2016-07-22 17:01:54 -07:00
Elliott Hughes
f6324d540a Fix our *ether* headers mess.
Move everything to where it should be.

Along the way, we lose <net/ethertypes.h>. glibc only has a handful of these
types, and they're all in <net/ethernet.h>, not <net/ethertypes.h>. I've taken
the liberty of not including the AppleTalk ones, since it is 2016.

Also, <net/if_ether.h> should be <netinet/if_ether.h> (though with different
contents).

Bug: http://b/28519060
Change-Id: Ia41c3fc136fd3e6b008c8d08018e0629134ea6fc
2016-05-13 11:00:22 -07:00
Elliott Hughes
bab9d7954a Remove <net/if_types.h>.
Bug: http://b/28519060
Change-Id: I7481df528b281344879b4aac32551d8c40824195
2016-05-11 15:00:19 -07:00
Elliott Hughes
12f35419ce Remove various bits of header cruft.
Mostly BSD _KERNEL stuff.

Change-Id: Ic0a6914437d0c831a83588a435079d0c719fcbdf
2016-05-10 17:32:48 -07:00
Elliott Hughes
af5afdba34 Merge "Remove <net/if_ieee1394.h>." 2016-05-02 21:11:10 +00:00
Elliott Hughes
82140bed6a Remove <net/if_ieee1394.h>.
It's 2016.

Bug: http://b/28519060
Change-Id: Idbb2c40f37e57a87933b8b13b20e15035105e918
2016-05-02 12:35:26 -07:00
Josh Gao
14adff1cfa Add versioning information to symbols.
Bug: http://b/28178111
Change-Id: I46bf95accd819f4521afb1173d8badcc5e9df31c
2016-04-29 16:39:50 -07:00
Josh Gao
c194fd30c6 Delete declarations which don't exist.
Bug: http://b/28178111
Change-Id: I72d5d015d7927a8df24b3973bf8a052053a067fb
2016-04-27 16:50:54 -07:00
Josh Gao
ef7c95b8ab Make the network headers compile standalone.
Bug: http://b/28067717
Change-Id: I0f69c6cba0eb0df2fe68f458ba5aa81fe8e6434c
2016-04-07 11:16:35 -07:00
Elliott Hughes
ed57b98758 Implement if_nameindex(3)/if_freenameindex(3).
This is just a subset of the recently-implemented getifaddrs(3), though if
we want to handle interfaces (such as "rmnet_*") that don't have an address,
we need to either expose ifaddrs_storage and keep track of which interfaces
we've already seen (which is pretty messy), or refactor the netlink code so
we can reuse it and just extract the information we need for if_nameindex(3).
This patch goes the latter route.

Also clean up if_nametoindex(3) and if_indextoname(3).

Change-Id: I5ffc5df0bab62286cdda2e7af06f032c767119a8
2016-01-18 12:07:38 -08:00
Elliott Hughes
badd7e1a58 Fix <net/route.h>.
Previously it couldn't be included alone. Also add a header and include guard,
and fix its siblings' include guards.

Bug: https://code.google.com/p/android/issues/detail?id=82638
Change-Id: I32139a4bda0a6b015508a2319bf4e1a1453345f2
2014-12-15 18:47:14 -08:00
Elliott Hughes
a7feda3731 <net/route.h> should include IPv6 too.
Change-Id: I866097d8468aa8f326117d072444ebbc2a690719
2014-12-09 15:08:24 -08:00
Elliott Hughes
1ec05b7c78 Sync <net/if_types.h> with upstream.
Change-Id: I2c2ca47f5a21b78754c03deb3e9467ab79d9d033
2014-12-09 15:03:51 -08:00
Elliott Hughes
86ec05acc9 Update the kernel headers to match external/kernel-headers.
Note that the Linux kernel handed over responsibility for most of the
socket constants to glibc some time ago. Someone had updated our
external/kernel-headers file but not regenerated the bionic headers,
so this change copies the missing stuff from the old bionic <linux/socket.h>
into <sys/socket.h>. This is what glibc does.

I've hacked a few of the other files to #include <sys/socket.h> for
backward compatibility, but even so this requires numerous other
changes to switch people over from direct inclusion of <linux/...> headers.

Change-Id: I0e4af64e631d3cef911a31d90f2f806e058278a0
2012-09-12 12:30:22 -07:00
Elliott Hughes
5056f1fad1 Remove the meaningless on Linux if_dl.h header.
This was misleading 'configure' into thinking we actually support AF_LINK,
but we're Linux, so we don't, and we never implemented the functions we
declared here either.

Reported to AOSP by Jun-ya Kato.

Change-Id: I111f9887f3812469b411b9cf5124d9dd624f19f7
2012-06-11 15:01:10 -07:00
JP Abgrall
c5d8d36d4d add net/ethernet.h stub
Some externals tend to use net/ethernet.h. Most of which is in net/if_ether.h.

Change-Id: I465d18136b565e56a4bd6678238fe0afef25d913
2011-04-05 11:48:52 -07:00
Szymon Jakubczak
41e533af4a added missing ether_aton and ether_ntoa
Change-Id: I32ee448abde4d5693d393030ed77ddc6d2ad1dfc
2010-08-25 08:46:23 -07:00
Jean-Baptiste Queru
3871d57ba5 Revert "added missing ether_aton and ether_ntoa"
This reverts commit 4032c1e2df.
2010-08-18 11:15:39 -07:00
Szymon Jakubczak
4032c1e2df added missing ether_aton and ether_ntoa
Change-Id: I32ee448abde4d5693d393030ed77ddc6d2ad1dfc
2010-06-11 20:48:40 -04:00
The Android Open Source Project
1dc9e472e1 auto import from //depot/cupcake/@135843 2009-03-03 19:28:35 -08:00
The Android Open Source Project
1767f908af auto import from //depot/cupcake/@135843 2009-03-03 18:28:13 -08:00
The Android Open Source Project
4e468ed2eb Code drop from //branches/cupcake/...@124589 2008-12-17 18:03:48 -08:00
The Android Open Source Project
a27d2baa0c Initial Contribution 2008-10-21 07:00:00 -07:00