#!/bin/sh
# nfcsys
# Copyright (c) 2006 by Cisco Systems, Inc.  All rights reserved.

# Set max UDP receive buffer size for Solaris.  Set at runtime in an rc script
# because there is no config file for this unlike Linux i.e. /etc/sysctl.conf.

PATH=/usr/xpg4/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb
UDP_RCVBUF_SIZE=20000000

if [ `uname` = SunOS ]; then
    if [ "`ndd -get /dev/udp udp_max_buf`" -lt $UDP_RCVBUF_SIZE ]; then
        ndd -set /dev/udp udp_max_buf $UDP_RCVBUF_SIZE
    fi
fi

exit 0

