You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: interface.rs
    path of file: ./repos/CYFS/src/service/ood-control/src
    
    the code of the file until where you have to start completion: use super::access_token::AccessTokenGen;
use super::controller::*;
use super::http_server::*;
use super::request::*;
use crate::OODControlMode;
use cyfs_base::*;
use cyfs_util::*;

use std::net::SocketAddr;
use std::net::{IpAddr, Ipv4Addr, Ipv6Addr};

#[derive(Debug, Clone)]
pub enum ControlInterfaceAddrType {
    V4,
    V6,
    All,
}

#[derive(Debug, Clone)]
pub enum ControlTCPHost {
    Default(IpAddr),
    Strict(IpAddr),
}

#[derive(Debug)]
pub struct ControlInterfaceParam {
    pub mode: OODControlMode,
    pub tcp_port: Option<u16>,

    pub addr_type: ControlInterfaceAddrType,

    // Whether access is required, if it is provided, then it will try to bind the public ip
    pub
    
    fn get_public_hosts() -> Vec<SocketAddr> {
        // Get the public network ipv4 and ipv6 addresses
        match cyfs_util::get_system_hosts() {
            Ok(mut info) => {
                let mut list = info.public_ip_v4;

                if list.is_empty() {
                    error!("retrieve system hosts but public ipv4 addrs not found!");
                    // public_ip_v4.push("0.0.0.0".to_string());
                }

                if info.ip_v6.len() > 0 {
                    list.append(&mut info.ip_v6);
                }

                list
            }
            Err(e) => {
                error!("retrieve system hosts failed, now will use default: {}", e);
                // vec!["0.0.0.0".to_string()]
                vec![]
            }
        }
    }