summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2003-04-11 04:09:14 +0000
committerTim Potter <tpot@samba.org>2003-04-11 04:09:14 +0000
commit065561932c660be13f80fefa2a310a51b0c07f9c (patch)
treea26a0d8b92f0a580e1e2c0463d7dd5752c31a5da /source3/lib
parentde4e2b578a7b2354135af9049d2ff2aab68fbb02 (diff)
downloadsamba-065561932c660be13f80fefa2a310a51b0c07f9c.tar.gz
samba-065561932c660be13f80fefa2a310a51b0c07f9c.tar.bz2
samba-065561932c660be13f80fefa2a310a51b0c07f9c.zip
A new RPC pipe! The \pipe\echo named pipe is for testing large RPC
requests and responses and is only compiled in when --enable-developer is passed to configure. It includes server and client side code for generating and responding to functions on this pipe. The functions are: - AddOne: add one to the uint32 argument and return ig - EchoData: echo back a variable sized char array to the caller - SourceData: request a variable sized char array - SinkData: send a variable sized char array and throw it away There's a win32 implementation of the client and server in the junkcode CVS repository in the rpcecho-win32 subdirectory. (This used to be commit 4ccd34ef836eba05f81dc2da73fd7cfaac201798)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/util.c44
1 files changed, 0 insertions, 44 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 3ecfc92552..ddc20e492c 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -1840,50 +1840,6 @@ enum remote_arch_types get_remote_arch(void)
return ra_type;
}
-
-void out_ascii(FILE *f, unsigned char *buf,int len)
-{
- int i;
- for (i=0;i<len;i++)
- fprintf(f, "%c", isprint(buf[i])?buf[i]:'.');
-}
-
-void out_data(FILE *f,char *buf1,int len, int per_line)
-{
- unsigned char *buf = (unsigned char *)buf1;
- int i=0;
- if (len<=0) {
- return;
- }
-
- fprintf(f, "[%03X] ",i);
- for (i=0;i<len;) {
- fprintf(f, "%02X ",(int)buf[i]);
- i++;
- if (i%(per_line/2) == 0) fprintf(f, " ");
- if (i%per_line == 0) {
- out_ascii(f,&buf[i-per_line ],per_line/2); fprintf(f, " ");
- out_ascii(f,&buf[i-per_line/2],per_line/2); fprintf(f, "\n");
- if (i<len) fprintf(f, "[%03X] ",i);
- }
- }
- if ((i%per_line) != 0) {
- int n;
-
- n = per_line - (i%per_line);
- fprintf(f, " ");
- if (n>(per_line/2)) fprintf(f, " ");
- while (n--) {
- fprintf(f, " ");
- }
- n = MIN(per_line/2,i%per_line);
- out_ascii(f,&buf[i-(i%per_line)],n); fprintf(f, " ");
- n = (i%per_line) - n;
- if (n>0) out_ascii(f,&buf[i-n],n);
- fprintf(f, "\n");
- }
-}
-
void print_asc(int level, const unsigned char *buf,int len)
{
int i;