Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
e1b9fcd4
Commit
e1b9fcd4
authored
Oct 05, 2009
by
malosek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moved pgm_create_custom_gsi into PGM1 and drop ssl dependency
parent
64e68e74
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
54 additions
and
38 deletions
+54
-38
configure.in
configure.in
+8
-10
create_custom_gsi.patch
foreign/openpgm/create_custom_gsi.patch
+43
-0
lost_data_tsi.patch
foreign/openpgm/lost_data_tsi.patch
+2
-2
pgm_socket.cpp
src/pgm_socket.cpp
+1
-17
pgm_socket.hpp
src/pgm_socket.hpp
+0
-3
platform.hpp.in
src/platform.hpp.in
+0
-6
No files found.
configure.in
View file @
e1b9fcd4
...
...
@@ -390,11 +390,6 @@ if test "x$with_pgm1_ext" != "xno"; then
;;
esac
AC_CHECK_HEADERS(openssl/md5.h, [] ,
[AC_MSG_ERROR([To run configure with --with-pgm option, openssl/md5.h has to be usable.])])
AC_CHECK_LIB(ssl, MD5_Init, , [AC_MSG_ERROR([Could not link with libssl, install develop version.])])
AC_CHECK_PROG(have_tar, tar, yes, no)
if test "x$have_tar" != "xyes"; then
AC_MSG_ERROR([Could not find tar.])
...
...
@@ -439,6 +434,14 @@ if test "x$with_pgm1_ext" != "xno"; then
AC_MSG_ERROR([Could not apply foreign/openpgm/lost_data_tsi.patch file.])
fi
AC_MSG_CHECKING([Patching ${pgm_basename}])
if patch --silent -p0 < foreign/openpgm/create_custom_gsi.patch; then
AC_MSG_RESULT([yes])
else
AC_MSG_ERROR([Could not apply foreign/openpgm/create_custom_gsi.patch file.])
fi
# Generate galois_tables.c
AC_CONFIG_COMMANDS([galois_tables.c],
[perl foreign/openpgm/libpgm-1.2.14/openpgm/pgm/galois_generator.pl > \
...
...
@@ -481,11 +484,6 @@ if test "x$with_pgm2_ext" != "xno"; then
;;
esac
AC_CHECK_HEADERS(openssl/md5.h, [] ,
[AC_MSG_ERROR([To run configure with --with-pgm2 option, openssl/md5.h has to be usable.])])
AC_CHECK_LIB(ssl, MD5_Init, , [AC_MSG_ERROR([Could not link with libssl, install develop version.])])
if test "x$pyzmq" != "xyes"; then
AC_CHECK_PROG(have_python, python, yes, no)
if test "x$have_python" != "xyes"; then
...
...
foreign/openpgm/create_custom_gsi.patch
0 → 100644
View file @
e1b9fcd4
--- foreign/openpgm/libpgm-1.2.14/openpgm/pgm/include/pgm/gsi.h 2009-08-27 04:53:23.000000000 +0200
+++ foreign/openpgm/libpgm-1.2.14/openpgm/pgm/include/pgm/gsi.h 2009-10-05 09:29:21.765126004 +0200
@@ -42,6 +42,7 @@
int pgm_create_md5_gsi (pgm_gsi_t*);
int pgm_create_ipv4_gsi (pgm_gsi_t*);
+int pgm_create_custom_gsi (const char *string_, pgm_gsi_t*);
int pgm_print_gsi_r (const pgm_gsi_t*, char*, gsize);
gchar* pgm_print_gsi (const pgm_gsi_t*);
--- foreign/openpgm/libpgm-1.2.14/openpgm/pgm/gsi.c 2009-08-27 04:53:25.000000000 +0200
+++ foreign/openpgm/libpgm-1.2.14/openpgm/pgm/gsi.c 2009-10-05 09:28:47.113125069 +0200
@@ -430,6 +430,28 @@
return retval;
}
+/* create a global session ID as low order 48 bits of md5 of the string. */
+int
+pgm_create_custom_gsi (
+ const char *string_,
+ pgm_gsi_t* gsi_
+ )
+{
+ g_return_val_if_fail (gsi_ != NULL, -EINVAL);
+
+ struct md5_ctx ctx;
+ char resblock [16];
+
+ md5_init_ctx (&ctx);
+ md5_process_bytes (string_, strlen (string_), &ctx);
+ md5_finish_ctx (&ctx, resblock);
+
+ memcpy (gsi_, resblock + 10, 6);
+
+ return 0;
+}
+
+
/* re-entrant form of pgm_print_gsi()
*/
int
foreign/openpgm/lost_data_tsi.patch
View file @
e1b9fcd4
--- libpgm-1.2.14/openpgm/pgm/transport.c 2009-08-27 04:54:04.000000000 +0200
---
foreign/openpgm/
libpgm-1.2.14/openpgm/pgm/transport.c 2009-08-27 04:54:04.000000000 +0200
+++ foreign/openpgm/libpgm-1.2.14/openpgm/pgm/transport.c 2009-09-22 14:36:07.713124619 +0200
@@ -2342,6 +2342,7 @@
if (waiting_rxw->ack_cumulative_losses != waiting_rxw->cumulative_losses)
...
...
@@ -64,7 +64,7 @@
rxw->pgm_sock_err.lost_count = rxw->cumulative_losses - rxw->ack_cumulative_losses;
rxw->ack_cumulative_losses = rxw->cumulative_losses;
--- libpgm-1.2.14/openpgm/pgm/include/pgm/transport.h 2009-08-27 04:53:23.000000000 +0200
---
foreign/openpgm/
libpgm-1.2.14/openpgm/pgm/include/pgm/transport.h 2009-08-27 04:53:23.000000000 +0200
+++ foreign/openpgm/libpgm-1.2.14/openpgm/pgm/include/pgm/transport.h 2009-09-21 15:49:36.000000000 +0200
@@ -205,6 +205,7 @@
gboolean is_bound;
...
...
src/pgm_socket.cpp
View file @
e1b9fcd4
...
...
@@ -22,11 +22,10 @@
#ifdef ZMQ_HAVE_OPENPGM
#ifdef ZMQ_HAVE_LINUX
// TODO: add this into platform.hpp?
// TODO:
needed for pgm -
add this into platform.hpp?
#define CONFIG_HAVE_POLL
#include <pgm/pgm.h>
#include <openssl/md5.h>
#endif
#include <string>
...
...
@@ -69,21 +68,6 @@ zmq::pgm_socket_t::pgm_socket_t (bool receiver_, const options_t &options_) :
}
int
zmq
::
pgm_socket_t
::
pgm_create_custom_gsi
(
const
char
*
data_
,
pgm_gsi_t
*
gsi_
)
{
unsigned
char
result_md5
[
16
];
MD5_CTX
ctx
;
MD5_Init
(
&
ctx
);
MD5_Update
(
&
ctx
,
data_
,
strlen
(
data_
));
MD5_Final
(
result_md5
,
&
ctx
);
memcpy
(
gsi_
,
result_md5
+
10
,
6
);
return
0
;
}
int
zmq
::
pgm_socket_t
::
init
(
bool
udp_encapsulation_
,
const
char
*
network_
)
{
udp_encapsulation
=
udp_encapsulation_
;
...
...
src/pgm_socket.hpp
View file @
e1b9fcd4
...
...
@@ -96,9 +96,6 @@ namespace zmq
// Returns maximum count of apdus which fills readbuf_size_
size_t
get_max_apdu_at_once
(
size_t
readbuf_size_
);
// Compute gsi from string.
int
pgm_create_custom_gsi
(
const
char
*
data_
,
pgm_gsi_t
*
gsi_
);
// Associated socket options.
options_t
options
;
...
...
src/platform.hpp.in
View file @
e1b9fcd4
...
...
@@ -36,9 +36,6 @@
/* Define to 1 if you have the `socket' library (-lsocket). */
#undef HAVE_LIBSOCKET
/* Define to 1 if you have the `ssl' library (-lssl). */
#undef HAVE_LIBSSL
/* Define to 1 if you have the `stdc++' library (-lstdc++). */
#undef HAVE_LIBSTDC__
...
...
@@ -64,9 +61,6 @@
/* Define to 1 if you have the <netinet/tcp.h> header file. */
#undef HAVE_NETINET_TCP_H
/* Define to 1 if you have the <openssl/md5.h> header file. */
#undef HAVE_OPENSSL_MD5_H
/* Define to 1 if you have the `perror' function. */
#undef HAVE_PERROR
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment