From: Chris Hanson Date: Mon, 31 Aug 1998 03:57:49 +0000 (+0000) Subject: Implement primitive to map socket port numbers from host to network X-Git-Tag: 20090517-FFI~4748 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=84daf66dffd990c99eb0205e009ad2fe38e80520;p=mit-scheme.git Implement primitive to map socket port numbers from host to network order. --- diff --git a/v7/src/microcode/os2sock.c b/v7/src/microcode/os2sock.c index 72ba016d1..a133884e6 100644 --- a/v7/src/microcode/os2sock.c +++ b/v7/src/microcode/os2sock.c @@ -1,8 +1,8 @@ /* -*-C-*- -$Id: os2sock.c,v 1.6 1997/11/12 22:14:09 cph Exp $ +$Id: os2sock.c,v 1.7 1998/08/31 03:57:49 cph Exp $ -Copyright (c) 1990-97 Massachusetts Institute of Technology +Copyright (c) 1990-98 Massachusetts Institute of Technology This material was developed by the Scheme project at the Massachusetts Institute of Technology, Department of Electrical Engineering and @@ -137,6 +137,12 @@ OS_get_service_by_name (const char * service_name, const char * protocol_name) return ((entry == 0) ? (-1) : (entry -> s_port)); } +unsigned short +OS_get_service_by_number (const unsigned short port_number) +{ + return (htons (port_number)); +} + unsigned int OS_host_address_length (void) {