| 
									
										
										
										
											2015-07-14 16:45:03 +00:00
										 |  |  | include ../mk/build.mk | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | INCLUDE_PATH	= ../include | 
					
						
							| 
									
										
										
										
											2015-07-28 00:07:24 -05:00
										 |  |  | HEADER_SUBDIR	= patty | 
					
						
							| 
									
										
										
										
											2015-07-14 16:45:03 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | CC		= $(CROSS)cc | 
					
						
							|  |  |  | CFLAGS		= $(CGFLAGS) -fPIC -Wall -O2 -I$(INCLUDE_PATH) | 
					
						
							| 
									
										
										
										
											2020-09-03 00:42:02 -04:00
										 |  |  | LDFLAGS		= -lutil | 
					
						
							| 
									
										
										
										
											2015-07-14 16:45:03 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
											  
											
												Implement new patty client code
Implement new patty client code, replacing src/call.c with src/client.c
providing clients with an interface dealing with file descriptors valid
in their process space; this also obviates the need to open a Unix
domain socket to a patty server explicitly, and helps keep track of
sockets opened on the server, locally
Changes:
    * Implement patty_client_new() to handle opening the server Unix
      domain socket, and to allocate a dict for mapping server-side
      sockets with current process file descriptors
    * Reimplement all server calls in src/call.c around the new
      patty_client type; calls which result in the creation of a
      Unix98 PTY by the patty server now handle opening the local PTY
      and setting the file descriptor to raw mode.  Furthermore, these
      calls deal exclusively in terms of current process file
      descriptors
    * Refactor src/server.c to use the new patty_client type and calls
    * Refactor examples/client.c, examples/server.c, examples/ax25dump.c
      to use the new patty_client type and calls
    * Fix a bug in src/server.c, respond_accept() wherein a 0, rather
      than the file descriptor of the socket, is sent to the client as a
      return value
											
										 
											2020-08-01 20:21:01 -04:00
										 |  |  | HEADERS		= kiss.h ax25.h client.h ax25/if.h ax25/frame.h \
 | 
					
						
							| 
									
										
										
										
											2020-08-24 22:56:38 -05:00
										 |  |  | 		  ax25/sock.h ax25/route.h ax25/server.h daemon.h list.h \
 | 
					
						
							| 
									
										
											  
											
												Implement bin/pattyd.c
Changes:
    * Implement src/conf.c, patty_conf_read(), to read a configuration
      file to support a OpenBSD-style configuration file format
    * Implement bin/pattyd.c to use patty_conf_read() to read a
      configuration file and apply its settings to a patty_daemon
      object as it is read; also implement a --standalone|-s flag to
      allow the user to start a patty server without having to write
      a configuration file
    * Refactor patty_daemon_if_add() to accept a patty_ax25_if object;
      this is necessary as bin/pattyd.c needs to be able to validate
      the addresses given in a configuration file 'if' statement
    * Refactor patty_ax25_server_new() to no longer accept a client
      socket path; instead, patty_ax25_server_start() now accepts the
      client socket path
    * Remove the client socket 'path' member from patty_ax25_server in
      src/server.c
    * Refactor patty_kiss_tnc_new() to accept only one argument, a
      patty_kiss_tnc_info object containing flags and settings needed
      to open a device, use an existing file descriptor, or change
      termios settings as appropriate
    * Remove patty_kiss_tnc_new_fd(), as its functionality now exists
      in patty_kiss_tnc_new() itself
    * Add a 'flags' field to patty_kiss_tnc_info; use this bit field
      to determine whether a path or file descriptor is provided by
      the caller
    * Make patty_ax25_if_new() accept an interface name argument, as
      names are explicitly required when declaring new interfaces in
      configuration files
    * Make patty_kiss_tnc_new() able to accept /dev/ptmx as a device
      name, regardless of whether this character device exists on a
      given platform; when provided, a pseudo TTY pair is allocated
      with openpty()
    * Refactor examples/ax25dump.c to use the new patty_kiss_tnc_new()
      calling convention
    * Refactor examples/decode.c to use the new patty_kiss_tnc_new()
      calling convention
    * Remove examples/daemon.c in favor of bin/pattyd.c
    * Rename examples/patty.conf to examples/pattyd.conf; modify to
      provide values which would actually function
											
										 
											2020-09-01 16:38:02 -05:00
										 |  |  | 		  hash.h dict.h timer.h print.h conf.h | 
					
						
							| 
									
										
										
										
											2015-07-19 22:40:51 -05:00
										 |  |  | 
 | 
					
						
							| 
									
										
											  
											
												Implement new patty client code
Implement new patty client code, replacing src/call.c with src/client.c
providing clients with an interface dealing with file descriptors valid
in their process space; this also obviates the need to open a Unix
domain socket to a patty server explicitly, and helps keep track of
sockets opened on the server, locally
Changes:
    * Implement patty_client_new() to handle opening the server Unix
      domain socket, and to allocate a dict for mapping server-side
      sockets with current process file descriptors
    * Reimplement all server calls in src/call.c around the new
      patty_client type; calls which result in the creation of a
      Unix98 PTY by the patty server now handle opening the local PTY
      and setting the file descriptor to raw mode.  Furthermore, these
      calls deal exclusively in terms of current process file
      descriptors
    * Refactor src/server.c to use the new patty_client type and calls
    * Refactor examples/client.c, examples/server.c, examples/ax25dump.c
      to use the new patty_client type and calls
    * Fix a bug in src/server.c, respond_accept() wherein a 0, rather
      than the file descriptor of the socket, is sent to the client as a
      return value
											
										 
											2020-08-01 20:21:01 -04:00
										 |  |  | OBJS		= kiss.o ax25.o client.o if.o frame.o \
 | 
					
						
							| 
									
										
										
										
											2020-08-24 22:56:38 -05:00
										 |  |  | 		  sock.o route.o server.o daemon.o list.o \
 | 
					
						
							| 
									
										
											  
											
												Implement bin/pattyd.c
Changes:
    * Implement src/conf.c, patty_conf_read(), to read a configuration
      file to support a OpenBSD-style configuration file format
    * Implement bin/pattyd.c to use patty_conf_read() to read a
      configuration file and apply its settings to a patty_daemon
      object as it is read; also implement a --standalone|-s flag to
      allow the user to start a patty server without having to write
      a configuration file
    * Refactor patty_daemon_if_add() to accept a patty_ax25_if object;
      this is necessary as bin/pattyd.c needs to be able to validate
      the addresses given in a configuration file 'if' statement
    * Refactor patty_ax25_server_new() to no longer accept a client
      socket path; instead, patty_ax25_server_start() now accepts the
      client socket path
    * Remove the client socket 'path' member from patty_ax25_server in
      src/server.c
    * Refactor patty_kiss_tnc_new() to accept only one argument, a
      patty_kiss_tnc_info object containing flags and settings needed
      to open a device, use an existing file descriptor, or change
      termios settings as appropriate
    * Remove patty_kiss_tnc_new_fd(), as its functionality now exists
      in patty_kiss_tnc_new() itself
    * Add a 'flags' field to patty_kiss_tnc_info; use this bit field
      to determine whether a path or file descriptor is provided by
      the caller
    * Make patty_ax25_if_new() accept an interface name argument, as
      names are explicitly required when declaring new interfaces in
      configuration files
    * Make patty_kiss_tnc_new() able to accept /dev/ptmx as a device
      name, regardless of whether this character device exists on a
      given platform; when provided, a pseudo TTY pair is allocated
      with openpty()
    * Refactor examples/ax25dump.c to use the new patty_kiss_tnc_new()
      calling convention
    * Refactor examples/decode.c to use the new patty_kiss_tnc_new()
      calling convention
    * Remove examples/daemon.c in favor of bin/pattyd.c
    * Rename examples/patty.conf to examples/pattyd.conf; modify to
      provide values which would actually function
											
										 
											2020-09-01 16:38:02 -05:00
										 |  |  | 		  hash.o dict.o timer.o print.o conf.o | 
					
						
							| 
									
										
										
										
											2015-07-14 16:45:03 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-03 00:40:15 -04:00
										 |  |  | VERSION_MAJOR	= 0 | 
					
						
							|  |  |  | VERSION_MINOR	= 0.1 | 
					
						
							|  |  |  | VERSION		= $(VERSION_MAJOR).$(VERSION_MINOR) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | LIBNAME		= patty | 
					
						
							| 
									
										
										
										
											2015-07-14 16:45:03 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-05-26 19:02:38 -04:00
										 |  |  | HEADERS_BUILD	= $(addprefix $(INCLUDE_PATH)/$(HEADER_SUBDIR)/, $(HEADERS)) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-03 00:40:15 -04:00
										 |  |  | all: $(STATIC) $(SONAME_FULL) $(SONAME) $(SONAME_SHORT) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | $(STATIC): $(OBJS) | 
					
						
							|  |  |  | 	$(AR) rc $(STATIC) $(OBJS) | 
					
						
							|  |  |  | 	$(RANLIB) $(STATIC) | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | $(SONAME_FULL): $(OBJS) | 
					
						
							|  |  |  | 	$(CC) $(LLFLAGS) $(OBJS) $(LDFLAGS) -o $(SONAME_FULL) | 
					
						
							| 
									
										
										
										
											2015-07-16 00:31:27 +00:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-03 00:40:15 -04:00
										 |  |  | $(SONAME): $(SONAME_FULL) | 
					
						
							|  |  |  | 	$(LN) -s $< $@ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | $(SONAME_SHORT): $(SONAME_FULL) | 
					
						
							|  |  |  | 	$(LN) -s $< $@ | 
					
						
							| 
									
										
										
										
											2015-07-14 16:45:03 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | $(OBJS): %.o: %.c $(HEADERS_BUILD) | 
					
						
							|  |  |  | 	$(CC) $(CFLAGS) -c $< | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-07-03 00:40:15 -04:00
										 |  |  | install: $(SONAME_FULL) $(STATIC) | 
					
						
							|  |  |  | 	$(INSTALL) -c -m 0644 $(STATIC) $(PREFIX)/lib | 
					
						
							|  |  |  | 	$(INSTALL) -c -m 0755 $(SONAME_FULL) $(PREFIX)/lib | 
					
						
							|  |  |  | 	$(LN) -s -f $(SONAME_FULL) $(PREFIX)/lib/$(SONAME) | 
					
						
							|  |  |  | 	$(LN) -s -f $(SONAME_FULL) $(PREFIX)/lib/$(SONAME_SHORT) | 
					
						
							|  |  |  | 	$(INSTALL) -d -m 0755 $(PREFIX)/include/$(HEADER_SUBDIR) | 
					
						
							|  |  |  | 	$(INSTALL) -c -m 0644 $(HEADERS_BUILD) $(PREFIX)/include/$(HEADER_SUBDIR) | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2015-07-14 16:45:03 +00:00
										 |  |  | clean: | 
					
						
							| 
									
										
										
										
											2020-07-03 00:40:15 -04:00
										 |  |  | 	$(RM) -f $(SONAME_SHORT) $(SONAME) $(SONAME_FULL) $(STATIC) $(OBJS) |