pysmb has a NBNSProtocol implementation for Twisted framework. This allows you to perform name query asynchronously without having your application to block and wait for the results.
Instantiate a NBNSProtocol instance.
This automatically calls reactor.listenUDP method to start listening for incoming packets, so you must not call the listenUDP method again.
Parameters: |
|
---|
Send a query to the machine with ip and hopes that the machine will reply back with its name.
The implementation of this function is contributed by Jason Anderson.
Parameters: |
|
---|---|
Returns: | A twisted.internet.defer.Deferred instance. The callback function will be called with a list of names of the machine at ip. On timeout, the errback function will be called with a Failure instance wrapping around a NetBIOSTimeout exception |
Send a query on the network and hopes that if machine matching the name will reply with its IP address.
Parameters: |
|
---|---|
Returns: | A twisted.internet.defer.Deferred instance. The callback function will be called with a list of IP addresses in dotted notation (aaa.bbb.ccc.ddd). On timeout, the errback function will be called with a Failure instance wrapping around a NetBIOSTimeout exception |