Techniques for translating between logical addresses and ports of a first
network, and logical addresses and ports of a second network connected to
the first network at an intermediate device include receiving a first
packet at the intermediate device from a first device having a first
address on the first network. A second packet is sent to a second device
on the second network in response to receiving the first packet. The
second packet includes, in a source address field, a particular address
of the intermediate device on the second network. It is determined
whether the first packet includes a resource registration message that
registers a first resource on the first device with a protocol server for
a particular protocol. The protocol server is available at the second
device on the second network. If the first packet includes the resource
registration message, then information in the resource registration
message for uniquely requesting the first resource is determined. The
first information is stored in a first data structure in association with
the first address. As a result, network address and port translation
(NAPT) functions in a system using NetBIOS protocol.