diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2004-10-21 10:52:03 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:02:22 -0500 |
commit | aa1c83bdbb7fb6d218ac5965433094fe127fc173 (patch) | |
tree | f8834b95bdaa5bd8957a22a9411ea672f32394bb /source4/librpc | |
parent | 6a304256d00e225872a06d1ec10152629352f41c (diff) | |
download | samba-aa1c83bdbb7fb6d218ac5965433094fe127fc173.tar.gz samba-aa1c83bdbb7fb6d218ac5965433094fe127fc173.tar.bz2 samba-aa1c83bdbb7fb6d218ac5965433094fe127fc173.zip |
r3111: Add a few more protocol identifiers, rhs for ncalrpc
(This used to be commit 53567a83cbca9df60bef76a15df24d2cd89a16b0)
Diffstat (limited to 'source4/librpc')
-rw-r--r-- | source4/librpc/idl/epmapper.idl | 48 | ||||
-rw-r--r-- | source4/librpc/rpc/dcerpc_util.c | 44 |
2 files changed, 62 insertions, 30 deletions
diff --git a/source4/librpc/idl/epmapper.idl b/source4/librpc/idl/epmapper.idl index eaf2b185f6..de45675c90 100644 --- a/source4/librpc/idl/epmapper.idl +++ b/source4/librpc/idl/epmapper.idl @@ -50,20 +50,24 @@ interface epmapper EPM_PROTOCOL_TCP = 0x07, EPM_PROTOCOL_UDP = 0x08, EPM_PROTOCOL_IP = 0x09, - /* These 4 are protocol identifiers, always at level 3 or lower */ EPM_PROTOCOL_NCADG = 0x0a, /* Connectionless RPC */ EPM_PROTOCOL_NCACN = 0x0b, EPM_PROTOCOL_NCALRPC = 0x0c, /* Local RPC */ EPM_PROTOCOL_UUID = 0x0d, - EPM_PROTOCOL_IPX = 0x0e, EPM_PROTOCOL_SMB = 0x0f, EPM_PROTOCOL_PIPE = 0x10, EPM_PROTOCOL_NETBIOS = 0x11, - EPM_PROTOCOL_NB_NB = 0x12, /* NetBIOS over NetBEUI */ + EPM_PROTOCOL_NETBEUI = 0x12, EPM_PROTOCOL_SPX = 0x13, EPM_PROTOCOL_NB_IPX = 0x14, /* NetBIOS over IPX */ + EPM_PROTOCOL_ATALK_STREAM = 0x16, + EPM_PROTOCOL_ATALK_DATAGRAM = 0x17, + EPM_PROTOCOL_APPLETALK = 0x18, /* AppleTalk */ + EPM_PROTOCOL_VINES_SPP = 0x1a, + EPM_PROTOCOL_VINES_IPC = 0x1b, + EPM_PROTOCOL_STREETTALK = 0x1c, EPM_PROTOCOL_HTTP = 0x1f, EPM_PROTOCOL_UNIX_DS = 0x20, /* Unix domain socket */ EPM_PROTOCOL_NULL = 0x21 @@ -127,7 +131,7 @@ interface epmapper } epm_rhs_netbios; typedef struct { - } epm_rhs_nb_nb; + } epm_rhs_netbeui; typedef struct { } epm_rhs_spx; @@ -147,8 +151,30 @@ interface epmapper } epm_rhs_null; typedef struct { + astring identifier; } epm_rhs_ncalrpc; + typedef struct { + } epm_rhs_appletalk; + + typedef struct { + } epm_rhs_atalk_stream; + + typedef struct { + } epm_rhs_atalk_datagram; + + typedef struct { + uint16 port; + } epm_rhs_vines_spp; + + typedef struct { + uint16 port; + } epm_rhs_vines_ipc; + + typedef struct { + astring streettalk; + } epm_rhs_streettalk; + typedef [flag(NDR_BIG_ENDIAN),nodiscriminant] union { [case(EPM_PROTOCOL_DNET_NSP)] epm_rhs_dnet_nsp dnet_nsp; [case(EPM_PROTOCOL_OSI_TP4)] epm_rhs_osi_tp4 osi_tp4; @@ -164,9 +190,15 @@ interface epmapper [case(EPM_PROTOCOL_SMB)] epm_rhs_smb smb; [case(EPM_PROTOCOL_PIPE)] epm_rhs_pipe pipe; [case(EPM_PROTOCOL_NETBIOS)] epm_rhs_netbios netbios; - [case(EPM_PROTOCOL_NB_NB)] epm_rhs_nb_nb nb_nb; + [case(EPM_PROTOCOL_NETBEUI)] epm_rhs_netbeui netbeui; [case(EPM_PROTOCOL_SPX)] epm_rhs_spx spx; [case(EPM_PROTOCOL_NB_IPX)] epm_rhs_nb_ipx nb_ipx; + [case(EPM_PROTOCOL_ATALK_STREAM)] epm_rhs_atalk_stream atalk_stream; + [case(EPM_PROTOCOL_ATALK_DATAGRAM)] epm_rhs_atalk_datagram atalk_datagram; + [case(EPM_PROTOCOL_APPLETALK)] epm_rhs_appletalk appletalk; + [case(EPM_PROTOCOL_VINES_SPP)] epm_rhs_vines_spp vines_spp; + [case(EPM_PROTOCOL_VINES_IPC)] epm_rhs_vines_ipc vines_ipc; + [case(EPM_PROTOCOL_STREETTALK)] epm_rhs_streettalk streettalk; [case(EPM_PROTOCOL_HTTP)] epm_rhs_http http; [case(EPM_PROTOCOL_UNIX_DS)] epm_rhs_unix_ds unix_ds; [case(EPM_PROTOCOL_NULL)] epm_rhs_null null; @@ -191,11 +223,11 @@ interface epmapper typedef [flag(NDR_NOALIGN|NDR_LITTLE_ENDIAN)] struct { uint16 num_floors; epm_floor floors[num_floors]; - } epm_towers; + } epm_tower; typedef [gensize] struct { - [value(ndr_size_epm_towers(0, &r->towers,ndr->flags))] uint32 tower_length; - [subcontext(4)] epm_towers towers; + [value(ndr_size_epm_tower(0, &r->tower,ndr->flags))] uint32 tower_length; + [subcontext(4)] epm_tower tower; } epm_twr_t; typedef struct { diff --git a/source4/librpc/rpc/dcerpc_util.c b/source4/librpc/rpc/dcerpc_util.c index ccb7f126ea..d034dd89d0 100644 --- a/source4/librpc/rpc/dcerpc_util.c +++ b/source4/librpc/rpc/dcerpc_util.c @@ -62,37 +62,37 @@ NTSTATUS dcerpc_epm_map_tcp_port(const char *server, ZERO_STRUCT(handle); ZERO_STRUCT(guid); - twr.towers.num_floors = 5; - twr.towers.floors = talloc(p, sizeof(twr.towers.floors[0]) * 5); + twr.tower.num_floors = 5; + twr.tower.floors = talloc(p, sizeof(twr.tower.floors[0]) * 5); /* what I'd like for christmas ... */ /* an RPC interface ... */ - twr.towers.floors[0].lhs.protocol = EPM_PROTOCOL_UUID; - GUID_from_string(uuid, &twr.towers.floors[0].lhs.info.uuid.uuid); - twr.towers.floors[0].lhs.info.uuid.version = version; - twr.towers.floors[0].rhs.uuid.unknown = 0; + twr.tower.floors[0].lhs.protocol = EPM_PROTOCOL_UUID; + GUID_from_string(uuid, &twr.tower.floors[0].lhs.info.uuid.uuid); + twr.tower.floors[0].lhs.info.uuid.version = version; + twr.tower.floors[0].rhs.uuid.unknown = 0; /* encoded with NDR ... */ - twr.towers.floors[1].lhs.protocol = EPM_PROTOCOL_UUID; - GUID_from_string(NDR_GUID, &twr.towers.floors[1].lhs.info.uuid.uuid); - twr.towers.floors[1].lhs.info.uuid.version = NDR_GUID_VERSION; - twr.towers.floors[1].rhs.uuid.unknown = 0; + twr.tower.floors[1].lhs.protocol = EPM_PROTOCOL_UUID; + GUID_from_string(NDR_GUID, &twr.tower.floors[1].lhs.info.uuid.uuid); + twr.tower.floors[1].lhs.info.uuid.version = NDR_GUID_VERSION; + twr.tower.floors[1].rhs.uuid.unknown = 0; /* on an RPC connection ... */ - twr.towers.floors[2].lhs.protocol = EPM_PROTOCOL_NCACN; - twr.towers.floors[2].lhs.info.lhs_data = data_blob(NULL, 0); - twr.towers.floors[2].rhs.ncacn.minor_version = 0; + twr.tower.floors[2].lhs.protocol = EPM_PROTOCOL_NCACN; + twr.tower.floors[2].lhs.info.lhs_data = data_blob(NULL, 0); + twr.tower.floors[2].rhs.ncacn.minor_version = 0; /* on a TCP port ... */ - twr.towers.floors[3].lhs.protocol = EPM_PROTOCOL_TCP; - twr.towers.floors[3].lhs.info.lhs_data = data_blob(NULL, 0); - twr.towers.floors[3].rhs.tcp.port = 0; + twr.tower.floors[3].lhs.protocol = EPM_PROTOCOL_TCP; + twr.tower.floors[3].lhs.info.lhs_data = data_blob(NULL, 0); + twr.tower.floors[3].rhs.tcp.port = 0; /* on an IP link ... */ - twr.towers.floors[4].lhs.protocol = EPM_PROTOCOL_IP; - twr.towers.floors[4].lhs.info.lhs_data = data_blob(NULL, 0); - twr.towers.floors[4].rhs.ip.address = 0; + twr.tower.floors[4].lhs.protocol = EPM_PROTOCOL_IP; + twr.tower.floors[4].lhs.info.lhs_data = data_blob(NULL, 0); + twr.tower.floors[4].rhs.ip.address = 0; /* with some nice pretty paper around it of course */ r.in.object = &guid; @@ -117,13 +117,13 @@ NTSTATUS dcerpc_epm_map_tcp_port(const char *server, return NT_STATUS_PORT_UNREACHABLE; } - if (twr_r->towers.num_floors != 5 || - twr_r->towers.floors[3].lhs.protocol != twr.towers.floors[3].lhs.protocol) { + if (twr_r->tower.num_floors != 5 || + twr_r->tower.floors[3].lhs.protocol != twr.tower.floors[3].lhs.protocol) { dcerpc_pipe_close(p); return NT_STATUS_PORT_UNREACHABLE; } - *port = twr_r->towers.floors[3].rhs.tcp.port; + *port = twr_r->tower.floors[3].rhs.tcp.port; dcerpc_pipe_close(p); |