Rev 40: Raw impl. of ibwrapper test tool. in
http://samba.org/~tridge/psomogyi/
Stefan (metze) Metzmacher
metze at samba.org
Fri Dec 15 10:39:48 GMT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Peter,
> +int ibwtest_receive_handler(struct ibw_conn *conn, void *buf, int n)
> +{
> + struct ibwtest_conn *pconn;
> + enum testopcode op;
> + struct ibwtest_ctx *tcx = talloc_get_type(conn->ctx->ctx_userdata, struct ibwtest_ctx);
> +
> + assert(conn!=NULL);
> + pconn = talloc_get_type(conn->conn_userdata, struct ibwtest_conn);
> +
> + op = (enum testopcode)((char *)buf)[0];
> + DEBUG(11, ("[%d]msg from %s: \"%s\"(%d)\n", op,
> + pconn->id ? pconn->id : NULL, ((char *)buf)+1, n));
> +
> + if (tcx->is_server) {
> + char *buf2;
> + void *key2;
> + /* bounce message */
> + if (ibw_alloc_send_buf(conn, (void **)&buf2, &key2)) {
> + fprintf(stderr, "ibw_alloc_send_buf error #2\n");
> + return -1;
> + }
> + memcpy(buf2, buf, n);
> + if (ibw_send(conn, buf2, key2, n)) {
> + fprintf(stderr, "ibw_send error #2\n");
> + return -2;
> + }
> + }
How does ibw_alloc_send_buf() know how many bytes to allocate?
metze
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org
iD8DBQFFgnt0m70gjA5TCD8RAsnHAJ9J7/107/BS+x1+2mUVVNMJZYuLpQCeIrbZ
qD0/jiZ61wLg0TYtwehXfuA=
=G4NQ
-----END PGP SIGNATURE-----
More information about the samba-technical
mailing list