-bin_PROGRAMS= tr/tr tid/example/tidc tid/example/tids common/dh_test/tr_dh_test
+bin_PROGRAMS= tr/trust_router tid/example/tidc tid/example/tids common/dh_test/tr_dh_test
AM_CPPFLAGS=-I$(srcdir)/include
AM_CFLAGS = -Wall -Werror=missing-prototypes -Werror=strict-prototypes -Wno-parentheses
SUBDIRS = gsscon
lib_LTLIBRARIES = libtr_tid.la
-tr_tr_SOURCES = tr/tr_main.c \
+tr_trust_router_SOURCES = tr/tr_main.c \
common/tr_config.c \
common/tr_idp.c \
common/tr_comm.c \
tr/tr.c
-tr_tr_LDADD = gsscon/libgsscon.la libtr_tid.la
+tr_trust_router_LDADD = gsscon/libgsscon.la libtr_tid.la
tid_example_tidc_SOURCES = tid/example/tidc_main.c
noinst_HEADERS = include/gsscon.h include/tr_config.h \
include/tr_msg.h \
-include/tr.h
+include/tr.h \
+ include/tr_idp.h include/tr_rp.h \
+ include/tr_comm.h
+
+EXTRA_DIST = trust_router.spec
size_t i, num_servers;
num_servers = json_array_size(jservers);
- fprintf(stderr, "tr_msg_decode_servers(): Number of servers = %d.\n", num_servers);
+ fprintf(stderr, "tr_msg_decode_servers(): Number of servers = %u.\n", (unsigned) num_servers);
if (0 == num_servers) {
fprintf(stderr, "tr_msg_decode_servers(): Server array is empty.\n");
#include <trust_router/tr_name.h>
#include <trust_router/tr_versioning.h>
+#include <gssapi.h>
#define TID_PORT 12309
-typedef struct gss_ctx_id_struct *gss_ctx_id_t;
+
typedef enum tid_rc {
TID_SUCCESS = 0,
return -1;
}
- fprintf(stdout, "Response Received (%d bytes).\n", resp_buflen);
+ fprintf(stdout, "Response Received (%u bytes).\n", (unsigned) resp_buflen);
fprintf(stdout, "%s\n", resp_buf);
if (NULL == (resp_msg = tr_msg_decode(resp_buf, resp_buflen))) {
{
int rc = 0;
int conn = -1;
- struct sockaddr_storage addr;
- struct sockaddr_in *saddr = (struct sockaddr_in *) &addr;
+ union {
+ struct sockaddr_storage storage;
+ struct sockaddr_in in4;
+ } addr;
+ struct sockaddr_in *saddr = (struct sockaddr_in *) &addr.in4;
saddr->sin_port = htons (port);
saddr->sin_family = AF_INET;
return -1;
}
- fprintf(stdout, "tids_read_request():Request Received, %d bytes.\n", buflen);
+ fprintf(stdout, "tids_read_request():Request Received, %u bytes.\n", (unsigned) buflen);
/* Parse request */
if (NULL == ((*mreq) = tr_msg_decode(buf, buflen))) {
--- /dev/null
+Name: trust_router
+Version: 0.0.1
+Release: 1%{?dist}
+Summary: Moonshot Trust Router
+
+Group: System Environment/Libraries
+License: BSD
+URL: http://www.project-moonshot.org/
+Source0: %{name}-%{version}.tar.gz
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+BuildRequires: krb5-devel
+BuildRequires: jansson-devel >= 2.4
+Requires: mech_eap
+
+%description
+The trust router provides a mechanism for discovering the topology of
+trust graphs in a topology and establishing temporary identities
+between them.
+
+
+%package devel
+Summary: Development files for %{name}
+Group: Development/Libraries
+Requires: %{name}-libs = %{version}-%{release}
+
+%description devel
+The %{name}-devel package contains libraries and header files for
+developing applications that use %{name}-libs.
+
+%package libs
+Summary: Libraries needed by %{Name}
+
+%description libs
+This package includes libraries needed by the %{Name} package or
+packages that wish trust_router functionality.
+
+
+
+
+%prep
+%setup -q
+
+
+%build
+%configure --disable-static
+make %{?_smp_mflags}
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make install DESTDIR=$RPM_BUILD_ROOT
+find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
+
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%post libs -p /sbin/ldconfig
+
+%postun libs -p /sbin/ldconfig
+
+
+%files
+%defattr(-,root,root,-)
+%doc README
+%{_bindir}/*
+
+%files libs
+%defattr(-,root,root,-)
+%{_libdir}/*.so.*
+
+%files devel
+%defattr(-,root,root,-)
+%{_includedir}/*
+%{_libdir}/*.so
+
+
+