The ServDB 구조

The ServDB 구조

이 구조는 서비스 데이터베이스의 엔트리를 조회하는 연산을 제공해요.

출처: 문서

본문

시놉시스 (Synopsis)

signature NET_SERV_DB (* OPTIONAL *)
structure NetServDB :> NET_SERV_DB (* OPTIONAL *)

인터페이스 (Interface)

type entry
val name : entry -> string
val aliases : entry -> string list
val port : entry -> int
val protocol : entry -> string
val getByName : string * string option -> entry option
val getByPort : int * string option -> entry option

설명 (Description)

type entry

서비스 데이터베이스의 엔트리 타입이에요.

name ent

getServByName (name, prot)는 이름과 프로토콜로 서비스 엔트리를 찾아 SOME을 돌려주고, 없으면 NONE을 돌려줘요.

aliases ent

getServByPort (port, prot)는 포트와 프로토콜로 서비스 엔트리를 찾아 SOME을 돌려주고, 없으면 NONE을 돌려줘요.

port ent

엔트리 ent로 설명되는 서비스의 포트 번호를 돌려줘요.

protocol ent

엔트리 ent로 설명되는 서비스에 사용할 프로토콜의 이름을 돌려줘요 (예: "tcp" 또는 "udp").

getByName (s, prot)

네트워크 서비스 데이터베이스에서 이름이 s인 서비스를 찾아요. prot이 SOME(protname)이면 서비스의 프로토콜도 protname과 일치해야 해요. prot이 NONE이면 프로토콜 제한을 두지 않아요. 찾으면 해당 데이터베이스 엔트리 en에 대해 SOME(en)을 돌려주고, 그렇지 않으면 NONE을 돌려줘요.

getByPort (i, prot)

네트워크 서비스 데이터베이스에서 포트 번호가 i인 서비스를 찾아요. prot이 SOME(protname)이면 서비스의 프로토콜도 protname과 일치해야 해요. prot이 NONE이면 프로토콜 제한을 두지 않아요. 찾으면 해당 데이터베이스 엔트리 en에 대해 SOME(en)을 돌려주고, 그렇지 않으면 NONE을 돌려줘요.

더 알아보기 (Learn more)

  • [ Top | Parent | Contents | Index | Root ] Generated April 12
  • 2004 Last Modified June 5
  • 1998 Comments to John Reppy. This document may be distributed freely over the internet as long as the copyright notice and license terms below are prominently displayed within every machine-readable copy. Copyright © 2004 AT&T and Lucent Technologies. All rights reserved. Permission is granted for internet users to make one paper copy for their own personal use. Further hardcopy reproduction is strictly prohibited. Permission to distribute the HTML document electronically on any medium other than the internet must be requested from the copyright holders by contacting the editors. Printed versions of the SML Basis Manual are available from Cambridge University Press. To order
  • please visit www.cup.org (North America) or www.cup.cam.ac.uk (outside North America).