Skip to content

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

@biswajitutil

Description

@biswajitutil

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions