# SPDX-License-Identifier: BSD-3-Clause
#
# Copyright 2020 Raritan Inc. All rights reserved.
#
# This file was generated by IdlC from Net.idl.

use strict;

package Raritan::RPC::net::IpRoute;

use Raritan::RPC::net::IpAddrCidr;

sub encode {
    my ($in) = @_;
    my $encoded = {};
    $encoded->{'destNetAddrCidr'} = Raritan::RPC::net::IpAddrCidr::encode($in->{'destNetAddrCidr'});
    $encoded->{'nextHopAddr'} = "$in->{'nextHopAddr'}";
    $encoded->{'ifName'} = "$in->{'ifName'}";
    return $encoded;
}

sub decode {
    my ($agent, $in) = @_;
    my $decoded = {};
    $decoded->{'destNetAddrCidr'} = Raritan::RPC::net::IpAddrCidr::decode($agent, $in->{'destNetAddrCidr'});
    $decoded->{'nextHopAddr'} = $in->{'nextHopAddr'};
    $decoded->{'ifName'} = $in->{'ifName'};
    return $decoded;
}

1;
