Browse Source

SCTP protocol name support in ser.cfg

- added missing support for SCTP in proto=..., listen a.s.o
Andrei Pelinescu-Onciul 17 years ago
parent
commit
c9831d2aff
2 changed files with 4 additions and 0 deletions
  1. 2 0
      cfg.lex
  2. 2 0
      cfg.y

+ 2 - 0
cfg.lex

@@ -367,6 +367,7 @@ NO			"no"|"false"|"off"|"disable"
 UDP			"udp"|"UDP"
 TCP			"tcp"|"TCP"
 TLS			"tls"|"TLS"
+SCTP		"sctp"|"SCTP"
 INET		"inet"|"INET"
 INET6		"inet6"|"INET6"
 SSLv23			"sslv23"|"SSLv23"|"SSLV23"
@@ -758,6 +759,7 @@ EAT_ABLE	[\ \t\b\r]
 <INITIAL>{TCP}			{ count(); return TCP; }
 <INITIAL>{UDP}			{ count(); return UDP; }
 <INITIAL>{TLS}			{ count(); return TLS; }
+<INITIAL>{SCTP}			{ count(); return SCTP; }
 <INITIAL>{INET}			{ count(); yylval.intval=AF_INET; return NUMBER; }
 <INITIAL>{INET6}		{ count();
 						#ifdef USE_IPV6

+ 2 - 0
cfg.y

@@ -274,6 +274,7 @@ static struct socket_id* mk_listen_id(char*, int, int);
 %token UDP
 %token TCP
 %token TLS
+%token SCTP
 
 /* config vars. */
 %token DEBUG_V
@@ -553,6 +554,7 @@ proto:
 	UDP	{ $$=PROTO_UDP; }
 	| TCP	{ $$=PROTO_TCP; }
 	| TLS	{ $$=PROTO_TLS; }
+	| SCTP	{ $$=PROTO_SCTP; }
 	| STAR	{ $$=0; }
 	;
 port: