| 1 | // Code generated by 'yaegi extract net'. DO NOT EDIT. |
| 2 | |
| 3 | //go:build go1.22 |
| 4 | // +build go1.22 |
| 5 | |
| 6 | package stdlib |
| 7 | |
| 8 | import ( |
| 9 | "go/constant" |
| 10 | "go/token" |
| 11 | "net" |
| 12 | "reflect" |
| 13 | "time" |
| 14 | ) |
| 15 | |
| 16 | func init() { |
| 17 | Symbols["net/net"] = map[string]reflect.Value{ |
| 18 | // function, constant and variable definitions |
| 19 | "CIDRMask": reflect.ValueOf(net.CIDRMask), |
| 20 | "DefaultResolver": reflect.ValueOf(&net.DefaultResolver).Elem(), |
| 21 | "Dial": reflect.ValueOf(net.Dial), |
| 22 | "DialIP": reflect.ValueOf(net.DialIP), |
| 23 | "DialTCP": reflect.ValueOf(net.DialTCP), |
| 24 | "DialTimeout": reflect.ValueOf(net.DialTimeout), |
| 25 | "DialUDP": reflect.ValueOf(net.DialUDP), |
| 26 | "DialUnix": reflect.ValueOf(net.DialUnix), |
| 27 | "ErrClosed": reflect.ValueOf(&net.ErrClosed).Elem(), |
| 28 | "ErrWriteToConnected": reflect.ValueOf(&net.ErrWriteToConnected).Elem(), |
| 29 | "FileConn": reflect.ValueOf(net.FileConn), |
| 30 | "FileListener": reflect.ValueOf(net.FileListener), |
| 31 | "FilePacketConn": reflect.ValueOf(net.FilePacketConn), |
| 32 | "FlagBroadcast": reflect.ValueOf(net.FlagBroadcast), |
| 33 | "FlagLoopback": reflect.ValueOf(net.FlagLoopback), |
| 34 | "FlagMulticast": reflect.ValueOf(net.FlagMulticast), |
| 35 | "FlagPointToPoint": reflect.ValueOf(net.FlagPointToPoint), |
| 36 | "FlagRunning": reflect.ValueOf(net.FlagRunning), |
| 37 | "FlagUp": reflect.ValueOf(net.FlagUp), |
| 38 | "IPv4": reflect.ValueOf(net.IPv4), |
| 39 | "IPv4Mask": reflect.ValueOf(net.IPv4Mask), |
| 40 | "IPv4allrouter": reflect.ValueOf(&net.IPv4allrouter).Elem(), |
| 41 | "IPv4allsys": reflect.ValueOf(&net.IPv4allsys).Elem(), |
| 42 | "IPv4bcast": reflect.ValueOf(&net.IPv4bcast).Elem(), |
| 43 | "IPv4len": reflect.ValueOf(constant.MakeFromLiteral("4", token.INT, 0)), |
| 44 | "IPv4zero": reflect.ValueOf(&net.IPv4zero).Elem(), |
| 45 | "IPv6interfacelocalallnodes": reflect.ValueOf(&net.IPv6interfacelocalallnodes).Elem(), |
| 46 | "IPv6len": reflect.ValueOf(constant.MakeFromLiteral("16", token.INT, 0)), |
| 47 | "IPv6linklocalallnodes": reflect.ValueOf(&net.IPv6linklocalallnodes).Elem(), |
| 48 | "IPv6linklocalallrouters": reflect.ValueOf(&net.IPv6linklocalallrouters).Elem(), |
| 49 | "IPv6loopback": reflect.ValueOf(&net.IPv6loopback).Elem(), |
| 50 | "IPv6unspecified": reflect.ValueOf(&net.IPv6unspecified).Elem(), |
| 51 | "IPv6zero": reflect.ValueOf(&net.IPv6zero).Elem(), |
| 52 | "InterfaceAddrs": reflect.ValueOf(net.InterfaceAddrs), |
| 53 | "InterfaceByIndex": reflect.ValueOf(net.InterfaceByIndex), |
| 54 | "InterfaceByName": reflect.ValueOf(net.InterfaceByName), |
| 55 | "Interfaces": reflect.ValueOf(net.Interfaces), |
| 56 | "JoinHostPort": reflect.ValueOf(net.JoinHostPort), |
| 57 | "Listen": reflect.ValueOf(net.Listen), |
| 58 | "ListenIP": reflect.ValueOf(net.ListenIP), |
| 59 | "ListenMulticastUDP": reflect.ValueOf(net.ListenMulticastUDP), |
| 60 | "ListenPacket": reflect.ValueOf(net.ListenPacket), |
| 61 | "ListenTCP": reflect.ValueOf(net.ListenTCP), |
| 62 | "ListenUDP": reflect.ValueOf(net.ListenUDP), |
| 63 | "ListenUnix": reflect.ValueOf(net.ListenUnix), |
| 64 | "ListenUnixgram": reflect.ValueOf(net.ListenUnixgram), |
| 65 | "LookupAddr": reflect.ValueOf(net.LookupAddr), |
| 66 | "LookupCNAME": reflect.ValueOf(net.LookupCNAME), |
| 67 | "LookupHost": reflect.ValueOf(net.LookupHost), |
| 68 | "LookupIP": reflect.ValueOf(net.LookupIP), |
| 69 | "LookupMX": reflect.ValueOf(net.LookupMX), |
| 70 | "LookupNS": reflect.ValueOf(net.LookupNS), |
| 71 | "LookupPort": reflect.ValueOf(net.LookupPort), |
| 72 | "LookupSRV": reflect.ValueOf(net.LookupSRV), |
| 73 | "LookupTXT": reflect.ValueOf(net.LookupTXT), |
| 74 | "ParseCIDR": reflect.ValueOf(net.ParseCIDR), |
| 75 | "ParseIP": reflect.ValueOf(net.ParseIP), |
| 76 | "ParseMAC": reflect.ValueOf(net.ParseMAC), |
| 77 | "Pipe": reflect.ValueOf(net.Pipe), |
| 78 | "ResolveIPAddr": reflect.ValueOf(net.ResolveIPAddr), |
| 79 | "ResolveTCPAddr": reflect.ValueOf(net.ResolveTCPAddr), |
| 80 | "ResolveUDPAddr": reflect.ValueOf(net.ResolveUDPAddr), |
| 81 | "ResolveUnixAddr": reflect.ValueOf(net.ResolveUnixAddr), |
| 82 | "SplitHostPort": reflect.ValueOf(net.SplitHostPort), |
| 83 | "TCPAddrFromAddrPort": reflect.ValueOf(net.TCPAddrFromAddrPort), |
| 84 | "UDPAddrFromAddrPort": reflect.ValueOf(net.UDPAddrFromAddrPort), |
| 85 | |
| 86 | // type definitions |
| 87 | "Addr": reflect.ValueOf((*net.Addr)(nil)), |
| 88 | "AddrError": reflect.ValueOf((*net.AddrError)(nil)), |
| 89 | "Buffers": reflect.ValueOf((*net.Buffers)(nil)), |
| 90 | "Conn": reflect.ValueOf((*net.Conn)(nil)), |
| 91 | "DNSConfigError": reflect.ValueOf((*net.DNSConfigError)(nil)), |
| 92 | "DNSError": reflect.ValueOf((*net.DNSError)(nil)), |
| 93 | "Dialer": reflect.ValueOf((*net.Dialer)(nil)), |
| 94 | "Error": reflect.ValueOf((*net.Error)(nil)), |
| 95 | "Flags": reflect.ValueOf((*net.Flags)(nil)), |
| 96 | "HardwareAddr": reflect.ValueOf((*net.HardwareAddr)(nil)), |
| 97 | "IP": reflect.ValueOf((*net.IP)(nil)), |
| 98 | "IPAddr": reflect.ValueOf((*net.IPAddr)(nil)), |
| 99 | "IPConn": reflect.ValueOf((*net.IPConn)(nil)), |
| 100 | "IPMask": reflect.ValueOf((*net.IPMask)(nil)), |
| 101 | "IPNet": reflect.ValueOf((*net.IPNet)(nil)), |
| 102 | "Interface": reflect.ValueOf((*net.Interface)(nil)), |
| 103 | "InvalidAddrError": reflect.ValueOf((*net.InvalidAddrError)(nil)), |
| 104 | "ListenConfig": reflect.ValueOf((*net.ListenConfig)(nil)), |
| 105 | "Listener": reflect.ValueOf((*net.Listener)(nil)), |
| 106 | "MX": reflect.ValueOf((*net.MX)(nil)), |
| 107 | "NS": reflect.ValueOf((*net.NS)(nil)), |
| 108 | "OpError": reflect.ValueOf((*net.OpError)(nil)), |
| 109 | "PacketConn": reflect.ValueOf((*net.PacketConn)(nil)), |
| 110 | "ParseError": reflect.ValueOf((*net.ParseError)(nil)), |
| 111 | "Resolver": reflect.ValueOf((*net.Resolver)(nil)), |
| 112 | "SRV": reflect.ValueOf((*net.SRV)(nil)), |
| 113 | "TCPAddr": reflect.ValueOf((*net.TCPAddr)(nil)), |
| 114 | "TCPConn": reflect.ValueOf((*net.TCPConn)(nil)), |
| 115 | "TCPListener": reflect.ValueOf((*net.TCPListener)(nil)), |
| 116 | "UDPAddr": reflect.ValueOf((*net.UDPAddr)(nil)), |
| 117 | "UDPConn": reflect.ValueOf((*net.UDPConn)(nil)), |
| 118 | "UnixAddr": reflect.ValueOf((*net.UnixAddr)(nil)), |
| 119 | "UnixConn": reflect.ValueOf((*net.UnixConn)(nil)), |
| 120 | "UnixListener": reflect.ValueOf((*net.UnixListener)(nil)), |
| 121 | "UnknownNetworkError": reflect.ValueOf((*net.UnknownNetworkError)(nil)), |
| 122 | |
| 123 | // interface wrapper definitions |
| 124 | "_Addr": reflect.ValueOf((*_net_Addr)(nil)), |
| 125 | "_Conn": reflect.ValueOf((*_net_Conn)(nil)), |
| 126 | "_Error": reflect.ValueOf((*_net_Error)(nil)), |
| 127 | "_Listener": reflect.ValueOf((*_net_Listener)(nil)), |
| 128 | "_PacketConn": reflect.ValueOf((*_net_PacketConn)(nil)), |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | // _net_Addr is an interface wrapper for Addr type |
| 133 | type _net_Addr struct { |
| 134 | IValue interface{} |
| 135 | WNetwork func() string |
| 136 | WString func() string |
| 137 | } |
| 138 | |
| 139 | func (W _net_Addr) Network() string { return W.WNetwork() } |
| 140 | func (W _net_Addr) String() string { |
| 141 | if W.WString == nil { |
| 142 | return "" |
| 143 | } |
| 144 | return W.WString() |
| 145 | } |
| 146 | |
| 147 | // _net_Conn is an interface wrapper for Conn type |
| 148 | type _net_Conn struct { |
| 149 | IValue interface{} |
| 150 | WClose func() error |
| 151 | WLocalAddr func() net.Addr |
| 152 | WRead func(b []byte) (n int, err error) |
| 153 | WRemoteAddr func() net.Addr |
| 154 | WSetDeadline func(t time.Time) error |
| 155 | WSetReadDeadline func(t time.Time) error |
| 156 | WSetWriteDeadline func(t time.Time) error |
| 157 | WWrite func(b []byte) (n int, err error) |
| 158 | } |
| 159 | |
| 160 | func (W _net_Conn) Close() error { return W.WClose() } |
| 161 | func (W _net_Conn) LocalAddr() net.Addr { return W.WLocalAddr() } |
| 162 | func (W _net_Conn) Read(b []byte) (n int, err error) { return W.WRead(b) } |
| 163 | func (W _net_Conn) RemoteAddr() net.Addr { return W.WRemoteAddr() } |
| 164 | func (W _net_Conn) SetDeadline(t time.Time) error { return W.WSetDeadline(t) } |
| 165 | func (W _net_Conn) SetReadDeadline(t time.Time) error { return W.WSetReadDeadline(t) } |
| 166 | func (W _net_Conn) SetWriteDeadline(t time.Time) error { return W.WSetWriteDeadline(t) } |
| 167 | func (W _net_Conn) Write(b []byte) (n int, err error) { return W.WWrite(b) } |
| 168 | |
| 169 | // _net_Error is an interface wrapper for Error type |
| 170 | type _net_Error struct { |
| 171 | IValue interface{} |
| 172 | WError func() string |
| 173 | WTemporary func() bool |
| 174 | WTimeout func() bool |
| 175 | } |
| 176 | |
| 177 | func (W _net_Error) Error() string { return W.WError() } |
| 178 | func (W _net_Error) Temporary() bool { return W.WTemporary() } |
| 179 | func (W _net_Error) Timeout() bool { return W.WTimeout() } |
| 180 | |
| 181 | // _net_Listener is an interface wrapper for Listener type |
| 182 | type _net_Listener struct { |
| 183 | IValue interface{} |
| 184 | WAccept func() (net.Conn, error) |
| 185 | WAddr func() net.Addr |
| 186 | WClose func() error |
| 187 | } |
| 188 | |
| 189 | func (W _net_Listener) Accept() (net.Conn, error) { return W.WAccept() } |
| 190 | func (W _net_Listener) Addr() net.Addr { return W.WAddr() } |
| 191 | func (W _net_Listener) Close() error { return W.WClose() } |
| 192 | |
| 193 | // _net_PacketConn is an interface wrapper for PacketConn type |
| 194 | type _net_PacketConn struct { |
| 195 | IValue interface{} |
| 196 | WClose func() error |
| 197 | WLocalAddr func() net.Addr |
| 198 | WReadFrom func(p []byte) (n int, addr net.Addr, err error) |
| 199 | WSetDeadline func(t time.Time) error |
| 200 | WSetReadDeadline func(t time.Time) error |
| 201 | WSetWriteDeadline func(t time.Time) error |
| 202 | WWriteTo func(p []byte, addr net.Addr) (n int, err error) |
| 203 | } |
| 204 | |
| 205 | func (W _net_PacketConn) Close() error { return W.WClose() } |
| 206 | func (W _net_PacketConn) LocalAddr() net.Addr { return W.WLocalAddr() } |
| 207 | func (W _net_PacketConn) ReadFrom(p []byte) (n int, addr net.Addr, err error) { return W.WReadFrom(p) } |
| 208 | func (W _net_PacketConn) SetDeadline(t time.Time) error { return W.WSetDeadline(t) } |
| 209 | func (W _net_PacketConn) SetReadDeadline(t time.Time) error { return W.WSetReadDeadline(t) } |
| 210 | func (W _net_PacketConn) SetWriteDeadline(t time.Time) error { return W.WSetWriteDeadline(t) } |
| 211 | func (W _net_PacketConn) WriteTo(p []byte, addr net.Addr) (n int, err error) { |
| 212 | return W.WWriteTo(p, addr) |
| 213 | } |