Implement struct printing
Also:
- fix potential use-after-free in nlbuf iterator
- simplify getFirst usage by migrating from std::optional to std::pair
Bug: 161898189
Test: print all messages from RTMGRP_LINK group
Change-Id: I4aa785ccef60e397ba87088f37e35d9873fc3c82
diff --git a/automotive/can/1.0/default/libnetdevice/Android.bp b/automotive/can/1.0/default/libnetdevice/Android.bp
index 928ad13..d49b9ab 100644
--- a/automotive/can/1.0/default/libnetdevice/Android.bp
+++ b/automotive/can/1.0/default/libnetdevice/Android.bp
@@ -28,6 +28,7 @@
"protocols/generic/Unknown.cpp",
"protocols/route/Link.cpp",
"protocols/route/Route.cpp",
+ "protocols/route/structs.cpp",
"protocols/MessageDefinition.cpp",
"protocols/NetlinkProtocol.cpp",
"protocols/all.cpp",