Add attribute offset support to cstruct

Add offset value of each struct attribute to cstruct. It is assigned
when initialize the struct. Also a helper function is provided to return
the offset value. Currently it does not work with nested struct.

Test: The unit test in cstruct_test.py should pass
Signed-off-by: Chenbo Feng <fengc@google.com>
Change-Id: I0944ed13785d6a6c8ddd2ecbfbb0ff60a1dfcf36
2 files changed
tree: dc38b9a2c4ae6dde8866c324ea71454f5720be4c
  1. net/