summaryrefslogtreecommitdiff
path: root/source4/torture/rpc/epmapper.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2004-10-11 20:12:51 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:59:48 -0500
commite2d27b9d238bd2cbf104237934db11e980977a0e (patch)
tree74887afea0e056c11fd7d6c14d2c978e631b0488 /source4/torture/rpc/epmapper.c
parent8e1ffff226e3016a38301a773ed8aa55bad5b710 (diff)
downloadsamba-e2d27b9d238bd2cbf104237934db11e980977a0e.tar.gz
samba-e2d27b9d238bd2cbf104237934db11e980977a0e.tar.bz2
samba-e2d27b9d238bd2cbf104237934db11e980977a0e.zip
r2921: Add a few more protocols and fix the numbers associated with some of
the current ones. It took me three hours to realise that the DCOM standard contains false protocol numbers (apparently someone converted the protocol numbers to hex twice, i.e. 13 -> 0c and 14 to 0d). There are no longer duplicates in the list with protocol numbers now. (This used to be commit f355cd426462a72575ef3c3b769f676334976986)
Diffstat (limited to 'source4/torture/rpc/epmapper.c')
-rw-r--r--source4/torture/rpc/epmapper.c60
1 files changed, 36 insertions, 24 deletions
diff --git a/source4/torture/rpc/epmapper.c b/source4/torture/rpc/epmapper.c
index 6a50d18276..ebb640b70d 100644
--- a/source4/torture/rpc/epmapper.c
+++ b/source4/torture/rpc/epmapper.c
@@ -33,11 +33,8 @@ static void display_tower(TALLOC_CTX *mem_ctx, struct epm_towers *twr)
for (i=0;i<twr->num_floors;i++) {
struct epm_lhs *lhs = &twr->floors[i].lhs;
struct epm_rhs *rhs = &twr->floors[i].rhs;
- switch (lhs->protocol) {
- case EPM_PROTOCOL_NCACN_DNET_NSP:
- printf(" DNET/NSP");
- break;
-
+
+ switch(lhs->protocol) {
case EPM_PROTOCOL_UUID:
uuid = GUID_string(mem_ctx, &lhs->info.uuid.uuid);
if (strcasecmp(uuid, NDR_GUID) == 0) {
@@ -47,11 +44,23 @@ static void display_tower(TALLOC_CTX *mem_ctx, struct epm_towers *twr)
}
break;
- case EPM_PROTOCOL_NCACN_RPC_C:
+ case EPM_PROTOCOL_NCACN:
printf(" RPC-C");
break;
- case EPM_PROTOCOL_NCACN_IP:
+ case EPM_PROTOCOL_NCADG:
+ printf(" RPC");
+ break;
+
+ case EPM_PROTOCOL_NCALRPC:
+ printf(" NCALRPC");
+ break;
+
+ case EPM_PROTOCOL_DNET_NSP:
+ printf(" DNET/NSP");
+ break;
+
+ case EPM_PROTOCOL_IP:
printf(" IP:");
if (rhs->rhs_data.length == 4) {
struct in_addr in;
@@ -60,43 +69,46 @@ static void display_tower(TALLOC_CTX *mem_ctx, struct epm_towers *twr)
}
break;
- case EPM_PROTOCOL_NCACN_PIPE:
+ case EPM_PROTOCOL_PIPE:
printf(" PIPE:%.*s", rhs->rhs_data.length, rhs->rhs_data.data);
break;
- case EPM_PROTOCOL_NCACN_SMB:
+ case EPM_PROTOCOL_SMB:
printf(" SMB:%.*s", rhs->rhs_data.length, rhs->rhs_data.data);
break;
- case EPM_PROTOCOL_NCACN_NETBIOS:
+ case EPM_PROTOCOL_UNIX_DS:
+ printf(" Unix Domain Socket:%.*s", rhs->rhs_data.length, rhs->rhs_data.data);
+ break;
+
+ case EPM_PROTOCOL_NETBIOS:
printf(" NetBIOS:%.*s", rhs->rhs_data.length, rhs->rhs_data.data);
break;
- case EPM_PROTOCOL_NCACN_NB_NB:
+ case EPM_PROTOCOL_NB_NB:
printf(" NB_NB");
break;
- case EPM_PROTOCOL_NCACN_SPX:
+ case EPM_PROTOCOL_SPX:
printf(" SPX");
break;
- /*
- case EPM_PROTOCOL_NCACN_NB_IPX:
+ case EPM_PROTOCOL_NB_IPX:
printf(" NB_IPX");
- break;*/
+ break;
case 0x01:
printf(" UNK(1):%.*s", rhs->rhs_data.length, rhs->rhs_data.data);
break;
- case EPM_PROTOCOL_NCACN_HTTP:
+ case EPM_PROTOCOL_HTTP:
printf(" HTTP:");
if (rhs->rhs_data.length == 2) {
printf("%d", RSVAL(rhs->rhs_data.data, 0));
}
break;
- case EPM_PROTOCOL_NCACN_TCP:
+ case EPM_PROTOCOL_TCP:
/* what is the difference between this and 0x1f? */
printf(" TCP:");
if (rhs->rhs_data.length == 2) {
@@ -104,7 +116,7 @@ static void display_tower(TALLOC_CTX *mem_ctx, struct epm_towers *twr)
}
break;
- case EPM_PROTOCOL_NCADG_UDP:
+ case EPM_PROTOCOL_UDP:
printf(" UDP:");
break;
@@ -149,15 +161,15 @@ static BOOL test_Map(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
printf("epm_Map results for '%s':\n",
idl_pipe_name(uuid_str, twr->towers.floors[0].lhs.info.uuid.version));
- twr->towers.floors[2].lhs.protocol = EPM_PROTOCOL_NCACN_RPC_C;
+ 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.rhs_data = data_blob_talloc_zero(p, 2);
- twr->towers.floors[3].lhs.protocol = EPM_PROTOCOL_NCACN_TCP;
+ 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.rhs_data = data_blob_talloc_zero(p, 2);
- twr->towers.floors[4].lhs.protocol = EPM_PROTOCOL_NCACN_IP;
+ 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.rhs_data = data_blob_talloc_zero(p, 4);
@@ -170,7 +182,7 @@ static BOOL test_Map(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
}
}
- twr->towers.floors[3].lhs.protocol = EPM_PROTOCOL_NCACN_HTTP;
+ twr->towers.floors[3].lhs.protocol = EPM_PROTOCOL_HTTP;
twr->towers.floors[3].lhs.info.lhs_data = data_blob(NULL, 0);
twr->towers.floors[3].rhs.rhs_data = data_blob_talloc_zero(p, 2);
@@ -183,11 +195,11 @@ static BOOL test_Map(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
}
}
- twr->towers.floors[3].lhs.protocol = EPM_PROTOCOL_NCACN_SMB;
+ twr->towers.floors[3].lhs.protocol = EPM_PROTOCOL_SMB;
twr->towers.floors[3].lhs.info.lhs_data = data_blob(NULL, 0);
twr->towers.floors[3].rhs.rhs_data = data_blob_talloc_zero(p, 2);
- twr->towers.floors[4].lhs.protocol = EPM_PROTOCOL_NCACN_NETBIOS;
+ twr->towers.floors[4].lhs.protocol = EPM_PROTOCOL_NETBIOS;
twr->towers.floors[4].lhs.info.lhs_data = data_blob(NULL, 0);
twr->towers.floors[4].rhs.rhs_data = data_blob_talloc_zero(p, 2);