Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-implement extension-data-function, more clearly #36

Open
slankdev opened this issue Jan 31, 2016 · 3 comments
Open

Re-implement extension-data-function, more clearly #36

slankdev opened this issue Jan 31, 2016 · 3 comments

Comments

@slankdev
Copy link
Owner

Extension-data's implementation is crude. We have to re-implement that.

@slankdev
Copy link
Owner Author

slankdev commented Feb 3, 2016

implementation example

pgen_arp pack;
pack.ARP.hwsrc = "";
pack.DATA[0] = 1;
pack.DATA[0] = 2;
char str = "test";
pgen_arp pack;
pack.ARP.hwsrc = "";
memcpy(pack.DATA, str, sizeof(str));

@slankdev
Copy link
Owner Author

slankdev commented Feb 3, 2016

implementation example

pgen_arp pack;
pack.ARP.hwsrc = "";
pack.DATA(str, sizeof(str));

@slankdev
Copy link
Owner Author

slankdev commented Feb 3, 2016

I didn't use these example. Implemented below.

implemented result

pgen_arp pack;
pack.ARP.hwsrc = "";
pack.DATA_set(str, sizeof(str));

pgen_hex(pack.DATA_get(), pack.DATA_len());

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant