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: sockaddr.rs
    path of file: ./repos/wireguard-rs/src/bsd
    
    the code of the file until where you have to start completion: //! Convert binary `sockaddr_in` or `sockaddr_in6` (see 
    
    fn pack_ip6() {
        let addr = SocketAddr::new(
            IpAddr::V6(Ipv6Addr::new(0, 0, 0, 0, 0, 0xffff, 0xc0a8, 0x0c22)),
            7301,
        );
        let buf = pack_sockaddr(&addr);
        assert_eq!(
            buf,
            [
                28,
                AF_INET6 as u8,
                28,
                133,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                0,
                255,
                255,
                192,
                168,
                12,
                34,
                0,
                0,
                0,
                0,
            ]
        );
    }