/*
 * common.c
 *
 * some common routines
 *
 * $Id: common.c,v 1.1 1999/08/10 18:07:52 naamato Exp $
 *
 */

#include <sys/types.h>
#include <sys/socket.h>
#include "rps.h"
#include "rps_ospf.h"

int
get_raw_sock(void)
{

	int sock;
	
	if ((sock = socket(AF_INET, SOCK_RAW, IPPROTO_OSPF)) < 0) {
		perror("socket");
		return -1;
	}

	return sock;
}
