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

Copy OPCUA_Binary record structures into another variable of same type #89

Open
biswajitutil opened this issue May 10, 2024 · 0 comments

Comments

@biswajitutil
Copy link

Hi,

I have a simple requirement of copying type OPCUA_Binary::XXX record structures into another variable of same type. I don't want to copy all the fields inside the structure one by one. Is it possible?

example:

type Info: record {
        bin_info: OPCUA_Binary::Info &optional;
};

redef record connection += {
        opcua_bin: Info &optional;
};

event opcua_binary_event(c: connection, info: OPCUA_Binary::Info)
   {
       set_service(c, "opcua-binary");
       info$ts  = network_time();
       info$uid = c$uid;
       info$id  = c$id;

       c$opcua_bin$bin_info = info;

       Log::write(ICSNPP_OPCUA_Binary::LOG, info);
    }

c$opcua_bin$bin_info = info; this assignement is giving expression error in main.zeek, line XXX: field value missing (ICSNPP_OPCUA_Binary::c$opcua_bin)

I am using Zeek 6.1.1.

Thanks
Biswa

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

No branches or pull requests

1 participant