c0beca55d290fe0b1c96d78cbbcf94b05c23f5a5 |
|
03-Sep-2015 |
Peter Qiu <zqiu@google.com> |
License shill to Apache2 This patch automatically replaced the license on all text files from Chromium OS (BSD style) to AOSP (Apache2), keeping the original year as a reference. The license header was added to .gyp and .gypi, the NOTICE was added with a copy of the Apache2 license and MODULE_LICENSE_* file was added. BUG=23587594 TEST=grep 'Chromium OS Authors' doesn't find anything. Change-Id: If41ede586c2465f5831fb7fee270ff41dbfdb596
/system/connectivity/shill/net/generic_netlink_message.cc
|
57282d5403b23162de1ded91ec8d73bdc19c922a |
|
29-Jul-2015 |
Paul Stewart <pstew@chromium.org> |
shill: netlink: Remove libgenl / libnl dependencies shill no longer depends on libgenl / libnl in any meaningful ways. This CL removes the last incidental dependencies and removes the link line for it: - Use of nla_total_len / nla_attr_size can be restated trivially using constants from linux/netlink.h. - The NLA_* type values no longer need to match up with libnl, since we don't use this for policy anymore. The NetlinkAttribute::Type is actually marginally more descriptive. - Remove defunct includes, references and comments. BUG=chromium:512152 TEST=Unit tests Change-Id: I8cb7d28f8382a0cfac0a3fe82acb1736ba321e27 Reviewed-on: https://chromium-review.googlesource.com/289236 Reviewed-by: Paul Stewart <pstew@chromium.org> Commit-Queue: Paul Stewart <pstew@chromium.org> Tested-by: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/net/generic_netlink_message.cc
|
979f851096ba2e4251d8beba2f7fc20d27a0cac3 |
|
28-Jul-2015 |
Paul Stewart <pstew@chromium.org> |
shill: NetlinkAttribute: Parse nlattr values Parse netlink attributes directly in NetlinkAttribute and NetlinkAttributeList. Packing and unpacking "tb" and "policy" data structures and calling nla_parse() and friends doesn't add any value, since NetlinkAttribute already has its own scheme (NestedData) for specifying type validation and custom decoding. The back-end for this refactor is a new IterateAttributes method written in AttributeList that walks an incoming payload to present each nlattr type and a ByteString containing the attribute payload. This means that all NetlinkAttribute types needed to be refactored to use "const ByteString&" for initialization. This CL also contains a few small fix-ups to unit tests (a couple missing ResetConsumedBytes() calls) and adds unit tests for IterateAttributes and the refactor of string validation over to NetlinkStringAttribute. CQ-DEPEND=CL:*224915 BUG=chromium:512152 TEST=Unit tests Change-Id: I416464dd928a4c8e024267d2e20234190995771b Reviewed-on: https://chromium-review.googlesource.com/289228 Reviewed-by: mukesh agrawal <quiche@chromium.org> Commit-Queue: Paul Stewart <pstew@chromium.org> Tested-by: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/net/generic_netlink_message.cc
|
b5b41b5ce5d06e9df1dbd7f319cc49ff982eb84e |
|
24-Jul-2015 |
Paul Stewart <pstew@chromium.org> |
shill: NetlinkManager: Use NetlinkPacket for incoming data Create NetlinkPacket instances for dispatching incoming netlink frames. As opposed to raw nlmsghdr pointers, NetlinkPacket objects can persistently contain both the bounds of the packet (since it is contained in a ByteString) as well as a counter for the data consumed from the payload so far. Use of this new data structure also resolves some tricky issues about "constness" with regards to the data passed to the NetlinkMessage. Previously, the code had a number of instances of "const_cast". Although NetlinkPacket objects are passed via non-const pointer, the class itself does not provide any non-const methods apart from those related to the consumption of data out of the payload. As a result, we have a reasonable guarantee that there will not be any non-obvious modification of either headers or payload as it is being processed. For purposes of unit tests which do have cases for header and payload modification, a MutableNetlinkPacket object is introduced to supply those needs in a manner that does not expose NetlinkPacket further. All NetlinkMessage objects have been converted to use this new datatype. BUG=chromium:512152 TEST=Unit tests Change-Id: I07180d8dcc70852998920fdbe97f9ef1511c1b2b Reviewed-on: https://chromium-review.googlesource.com/287913 Reviewed-by: mukesh agrawal <quiche@chromium.org> Commit-Queue: Paul Stewart <pstew@chromium.org> Tested-by: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/net/generic_netlink_message.cc
|
e67a78539a05ea7fc68ed5ca18f6d1de333a3086 |
|
16-Jun-2015 |
Paul Stewart <pstew@chromium.org> |
shill: net: Switch pointer/ref spacing Switch to Chrome style spacing. BUG=chromium:501026 TEST=Unit tests Change-Id: Ice57438655da8f177e5a8aa6fd602779ba21c357 Reviewed-on: https://chromium-review.googlesource.com/278075 Reviewed-by: Rebecca Silberstein <silberst@chromium.org> Commit-Queue: Paul Stewart <pstew@chromium.org> Tested-by: Paul Stewart <pstew@chromium.org>
/system/connectivity/shill/net/generic_netlink_message.cc
|
900ab5eff3f23a18feb955210e8acc9fb5cfa292 |
|
04-Feb-2015 |
Samuel Tan <samueltan@chromium.org> |
shill: make netlink message creation context-dependent Provide shill with context when it parses netlink messages received in NetlinkManager::OnNlMessageReceived using NetlinkMessageFactory::CreateMessage. Do this by inferring a NetlinkMessage::MessageContext in NetlinkManager immediately after receiving the message, and then passing this context along to NetlinkMessageFactory::CreateMessage and any subsequent functions it invokes that might use this context to decide how to parse the message. In this CL, we pass this context through to the Nl80211AttributeWowlanTriggers constructor, which can use this context to decide how to parse the NL80211_WOWLAN_TRIG_PKT_PATTERN attribute. In order to reduce the size and impact of this change, NetlinkMessage::MessageContext is not passed to functions that do not use it. In the future, function signatures can be modified to accept a MessageContext (and new members can be added to the MessageContext struct) if it is required to properly parse a netlink messages/attributes. BUG=chromium:455435 TEST=Compile shill and run unit tests. Change-Id: Ib8858a57ec366408dcf5e6211007c8680e45a7f1 Reviewed-on: https://chromium-review.googlesource.com/246364 Reviewed-by: Samuel Tan <samueltan@chromium.org> Tested-by: Samuel Tan <samueltan@chromium.org> Commit-Queue: Samuel Tan <samueltan@chromium.org>
/system/connectivity/shill/net/generic_netlink_message.cc
|
02e3dc3bc6e9fdb475bd13944f1c6764c921abbb |
|
31-Oct-2014 |
Peter Qiu <zqiu@chromium.org> |
shill: Move netlink functionality to libshill-net shared library By exporting netlink functionality to a shared library, other applications can use the interfaces provided by this library to communicate with the cfg80211 kernel module and mac80211 drivers. To use this library, add dependency for libshill-net-<(libbase_ver) in your gyp file, and include the headers from <shill/net/*> BUG=chromium:427982 TEST=unittests, run wifi_matfunc suite for shill regression test Change-Id: Ia8ea063daaa63de27fe81e153458e149586086ec Reviewed-on: https://chromium-review.googlesource.com/226830 Reviewed-by: Paul Stewart <pstew@chromium.org> Commit-Queue: Peter Qiu <zqiu@chromium.org> Tested-by: Peter Qiu <zqiu@chromium.org>
/system/connectivity/shill/net/generic_netlink_message.cc
|