diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2012-03-25 21:38:59 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2012-03-27 00:32:48 +0200 |
commit | 95ebb111ba7e5fbc1e8ca6c560c473d24c5d6c2d (patch) | |
tree | 4eee8d3e397eb066547690d8e1bc51bdd763d089 /selftest/target | |
parent | a9da0409ba0e859533acea83c5c85798705cb5eb (diff) | |
download | samba-95ebb111ba7e5fbc1e8ca6c560c473d24c5d6c2d.tar.gz samba-95ebb111ba7e5fbc1e8ca6c560c473d24c5d6c2d.tar.bz2 samba-95ebb111ba7e5fbc1e8ca6c560c473d24c5d6c2d.zip |
selftest.py: Add get_interface.
Autobuild-User: Jelmer Vernooij <jelmer@samba.org>
Autobuild-Date: Tue Mar 27 00:32:48 CEST 2012 on sn-devel-104
Diffstat (limited to 'selftest/target')
-rw-r--r-- | selftest/target/samba.py | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/selftest/target/samba.py b/selftest/target/samba.py index 1ea156c003..666d223ff1 100644 --- a/selftest/target/samba.py +++ b/selftest/target/samba.py @@ -119,3 +119,37 @@ def cleanup_child(pid, name, outf=None): else: outf.write("%s child process %d exited with value %d.\n" % (name, childpid, status >> 8)) return childpid + + +def get_interface(netbiosname): + """Return interface id for a particular server. + """ + netbiosname = netbiosname.lower() + + interfaces = { + "locals3dc2": 2, + "localmember3": 3, + "localshare4": 4, + "localserver5": 5, + "localktest6": 6, + "maptoguest": 7, + + # 11-16 used by selftest.pl for client interfaces + "localdc": 21, + "localvampiredc": 22, + "s4member": 23, + "localrpcproxy": 24, + "dc5": 25, + "dc6": 26, + "dc7": 27, + "rodc": 28, + "localadmember": 29, + "plugindc": 30, + "localsubdc": 31, + "chgdcpass": 32, + } + + # update lib/socket_wrapper/socket_wrapper.c + # #define MAX_WRAPPED_INTERFACES 32 + # if you wish to have more than 32 interfaces + return interfaces[netbiosname] |