ParseIP 分析IP的PTR值
(ip string)
| 111 | |
| 112 | // ParseIP 分析IP的PTR值 |
| 113 | func (this *Queue) ParseIP(ip string) (ptr string, err error) { |
| 114 | if len(ip) == 0 { |
| 115 | return "", nil |
| 116 | } |
| 117 | |
| 118 | names, err := net.LookupAddr(ip) |
| 119 | if err != nil { |
| 120 | return "", err |
| 121 | } |
| 122 | |
| 123 | if len(names) == 0 { |
| 124 | return "", nil |
| 125 | } |
| 126 | |
| 127 | return names[0], nil |
| 128 | } |
| 129 | |
| 130 | // ParsePtr 分析PTR对应的Agent |
| 131 | func (this *Queue) ParsePtr(ptr string) (agentCode string) { |
no outgoing calls